Class WebPChunk
java.lang.Object
org.apache.commons.imaging.common.BinaryFileParser
org.apache.commons.imaging.formats.webp.chunks.WebPChunk
- Direct Known Subclasses:
WebPChunkAlph,WebPChunkAnim,WebPChunkAnmf,WebPChunkExif,WebPChunkIccp,WebPChunkVp8,WebPChunkVp8l,WebPChunkVp8x,WebPChunkXml,WebPChunkXyzw
A WebP image is composed of several chunks. This is the base class for the chunks, used by the parser.
- Since:
- 1.0-alpha4
- See Also:
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoiddump(PrintWriter pw, int offset) Print the chunk to the given stream.byte[]getBytes()intintintgetType()Methods inherited from class org.apache.commons.imaging.common.BinaryFileParser
debugNumber, debugNumber, getByteOrder, setByteOrder
-
Field Details
-
bytes
-
-
Method Details
-
dump
Print the chunk to the given stream.- Parameters:
pw- a stream to write to.offset- chunk offset.- Throws:
ImagingException- if the image is invalid.IOException- if it fails to write to the given stream.
-
getBytes
- Returns:
- a copy of the chunk data as bytes.
-
getChunkSize
- Returns:
- the chunk size.
-
getPayloadSize
- Returns:
- the payload size.
-
getType
- Returns:
- the chunk type.
-
getTypeDescription
- Returns:
- the description of the chunk type.
-