public class ExperimentalRawFile extends Object implements Described, HasBasicSizeinfo
Constructor and Description |
---|
ExperimentalRawFile(String description,
long time,
String contentTye,
byte[] content)
Construct.
|
Modifier and Type | Method and Description |
---|---|
long |
fillPartialContent(byte[] buf,
long start,
long len)
Return part of the content.
|
byte[] |
getContent()
Return content.
|
String |
getContentType()
Stored content type.
|
String |
getDescription()
Human readable description of the instance.
|
byte[] |
getPartialContent(long start,
long len)
Return part of the content.
|
long |
getSize()
Size of the represented resource.
|
SizeInfoDto |
getSizeInfo(Function<Object,Long> sizeof)
Invoke size calculation.
|
long |
getTime()
Init/load/prepare time of the represented resource.
|
public SizeInfoDto getSizeInfo(Function<Object,Long> sizeof)
HasBasicSizeinfo
getSizeInfo
in interface HasBasicSizeinfo
sizeof
- Function for deep size calculation, expected to handle NoSize
annotations.public String getDescription()
Described
getDescription
in interface Described
public byte[] getContent()
public long fillPartialContent(byte[] buf, long start, long len)
buf
- Target bufferstart
- Start byte of the content to filllen
- Maximal number of bytes to fillpublic byte[] getPartialContent(long start, long len)
start
- Start byte of the content to filllen
- Maximal number of bytes to fillpublic long getSize()
Described
getSize
in interface Described
ResourceInfo.sizeDescription()
public long getTime()
Described
public String getContentType()