Class OriginTrackedResource
java.lang.Object
org.springframework.boot.origin.OriginTrackedResource
- All Implemented Interfaces:
- OriginProvider,- org.springframework.core.io.InputStreamSource,- org.springframework.core.io.Resource
- Direct Known Subclasses:
- OriginTrackedResource.OriginTrackedWritableResource
public class OriginTrackedResource
extends Object
implements org.springframework.core.io.Resource, OriginProvider
- Since:
- 2.4.0
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classVariant ofOriginTrackedResourceforWritableResourceinstances.
- 
Method SummaryModifier and TypeMethodDescriptionlongorg.springframework.core.io.ResourcecreateRelative(String relativePath) booleanbooleanexists()getFile()@Nullable String@Nullable OriginReturn the source origin ornullif the origin is not known.org.springframework.core.io.ResourcegetURI()getURL()inthashCode()booleanisFile()booleanisOpen()booleanlongstatic OriginTrackedResourceReturn a neworigin trackedversion the givenResource.Return a neworigin trackedversion the givenWritableResource.toString()Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.io.ResourcegetContentAsByteArray, getContentAsString
- 
Method Details- 
getInputStream- Specified by:
- getInputStreamin interface- org.springframework.core.io.InputStreamSource
- Throws:
- IOException
 
- 
existspublic boolean exists()- Specified by:
- existsin interface- org.springframework.core.io.Resource
 
- 
isReadablepublic boolean isReadable()- Specified by:
- isReadablein interface- org.springframework.core.io.Resource
 
- 
isOpenpublic boolean isOpen()- Specified by:
- isOpenin interface- org.springframework.core.io.Resource
 
- 
isFilepublic boolean isFile()- Specified by:
- isFilein interface- org.springframework.core.io.Resource
 
- 
getURL- Specified by:
- getURLin interface- org.springframework.core.io.Resource
- Throws:
- IOException
 
- 
getURI- Specified by:
- getURIin interface- org.springframework.core.io.Resource
- Throws:
- IOException
 
- 
getFile- Specified by:
- getFilein interface- org.springframework.core.io.Resource
- Throws:
- IOException
 
- 
readableChannel- Specified by:
- readableChannelin interface- org.springframework.core.io.Resource
- Throws:
- IOException
 
- 
contentLength- Specified by:
- contentLengthin interface- org.springframework.core.io.Resource
- Throws:
- IOException
 
- 
lastModified- Specified by:
- lastModifiedin interface- org.springframework.core.io.Resource
- Throws:
- IOException
 
- 
createRelative- Specified by:
- createRelativein interface- org.springframework.core.io.Resource
- Throws:
- IOException
 
- 
getFilename- Specified by:
- getFilenamein interface- org.springframework.core.io.Resource
 
- 
getDescription- Specified by:
- getDescriptionin interface- org.springframework.core.io.Resource
 
- 
getResourcepublic org.springframework.core.io.Resource getResource()
- 
getOriginDescription copied from interface:OriginProviderReturn the source origin ornullif the origin is not known.- Specified by:
- getOriginin interface- OriginProvider
- Returns:
- the origin or null
 
- 
equals
- 
hashCode
- 
toString
- 
ofpublic static OriginTrackedResource.OriginTrackedWritableResource of(org.springframework.core.io.WritableResource resource, Origin origin) Return a neworigin trackedversion the givenWritableResource.- Parameters:
- resource- the tracked resource
- origin- the origin of the resource
- Returns:
- an OriginTrackedResource.OriginTrackedWritableResourceinstance
 
- 
ofpublic static OriginTrackedResource of(org.springframework.core.io.Resource resource, @Nullable Origin origin) Return a neworigin trackedversion the givenResource.- Parameters:
- resource- the tracked resource
- origin- the origin of the resource
- Returns:
- an OriginTrackedResourceinstance
 
 
-