Interface SerializableResource
-
- All Known Implementing Classes:
BinaryResourceConfiguration,BinaryResourceFile,BinaryResourceValue,Chunk,ChunkWithChunks,LibraryChunk,LibraryChunk.Entry,PackageChunk,ResourceTableChunk,StringPoolChunk,StringPoolChunk.StringPoolStyle,TypeChunk,TypeChunk.Entry,TypeSpecChunk,UnknownChunk,XmlAttribute,XmlCdataChunk,XmlChunk,XmlEndElementChunk,XmlNamespaceChunk,XmlNamespaceEndChunk,XmlNamespaceStartChunk,XmlNodeChunk,XmlResourceMapChunk,XmlStartElementChunk
public interface SerializableResourceA resource, typically a @{link Chunk}, that can be converted to an array of bytes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description byte[]toByteArray()Converts this resource into an array of bytes representation.byte[]toByteArray(boolean shrink)Converts this resource into an array of bytes representation.
-
-
-
Method Detail
-
toByteArray
byte[] toByteArray() throws java.io.IOExceptionConverts this resource into an array of bytes representation.- Returns:
- An array of bytes representing this resource.
- Throws:
java.io.IOException
-
toByteArray
byte[] toByteArray(boolean shrink) throws java.io.IOExceptionConverts this resource into an array of bytes representation.- Parameters:
shrink- True if, when converting to a byte array, this resource can modify the returned bytes in an effort to reduce the size.- Returns:
- An array of bytes representing this resource.
- Throws:
java.io.IOException
-
-