Package org.springframework.boot.origin
Class OriginTrackedResource
java.lang.Object
org.springframework.boot.origin.OriginTrackedResource
- All Implemented Interfaces:
 OriginProvider,InputStreamSource,Resource
- Direct Known Subclasses:
 OriginTrackedResource.OriginTrackedWritableResource
- Since:
 - 2.4.0
 - Author:
 - Phillip Webb
 - See Also:
 
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classVariant ofOriginTrackedResourceforWritableResourceinstances. - 
Method Summary
Modifier and TypeMethodDescriptionlongcreateRelative(String relativePath) booleanbooleanexists()getFile()Return the source origin ornullif the origin is not known.getURI()getURL()inthashCode()booleanisFile()booleanisOpen()booleanlongstatic OriginTrackedResourceReturn a neworigin trackedversion the givenResource.of(WritableResource resource, Origin origin) Return a neworigin trackedversion the givenWritableResource.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.core.io.Resource
getContentAsByteArray, getContentAsString 
- 
Method Details
- 
getInputStream
- Specified by:
 getInputStreamin interfaceInputStreamSource- Throws:
 IOException
 - 
exists
public boolean exists() - 
isReadable
public boolean isReadable()- Specified by:
 isReadablein interfaceResource
 - 
isOpen
public boolean isOpen() - 
isFile
public boolean isFile() - 
getURL
- Specified by:
 getURLin interfaceResource- Throws:
 IOException
 - 
getURI
- Specified by:
 getURIin interfaceResource- Throws:
 IOException
 - 
getFile
- Specified by:
 getFilein interfaceResource- Throws:
 IOException
 - 
readableChannel
- Specified by:
 readableChannelin interfaceResource- Throws:
 IOException
 - 
contentLength
- Specified by:
 contentLengthin interfaceResource- Throws:
 IOException
 - 
lastModified
- Specified by:
 lastModifiedin interfaceResource- Throws:
 IOException
 - 
createRelative
- Specified by:
 createRelativein interfaceResource- Throws:
 IOException
 - 
getFilename
- Specified by:
 getFilenamein interfaceResource
 - 
getDescription
- Specified by:
 getDescriptionin interfaceResource
 - 
getResource
 - 
getOrigin
Description copied from interface:OriginProviderReturn the source origin ornullif the origin is not known.- Specified by:
 getOriginin interfaceOriginProvider- Returns:
 - the origin or 
null 
 - 
equals
 - 
hashCode
public int hashCode() - 
toString
 - 
of
public static OriginTrackedResource.OriginTrackedWritableResource of(WritableResource resource, Origin origin) Return a neworigin trackedversion the givenWritableResource.- Parameters:
 resource- the tracked resourceorigin- the origin of the resource- Returns:
 - an 
OriginTrackedResource.OriginTrackedWritableResourceinstance 
 - 
of
Return a neworigin trackedversion the givenResource.- Parameters:
 resource- the tracked resourceorigin- the origin of the resource- Returns:
 - an 
OriginTrackedResourceinstance 
 
 -