Class AbstractGenericSegment
java.lang.Object
org.apache.commons.imaging.common.BinaryFileParser
org.apache.commons.imaging.formats.jpeg.segments.AbstractSegment
org.apache.commons.imaging.formats.jpeg.segments.AbstractGenericSegment
- Direct Known Subclasses:
- AppnSegment,- ComSegment,- UnknownSegment
- 
Field SummaryFields inherited from class org.apache.commons.imaging.formats.jpeg.segments.AbstractSegmentlength, marker
- 
Constructor SummaryConstructorsConstructorDescriptionAbstractGenericSegment(int marker, byte[] bytes) AbstractGenericSegment(int marker, int markerLength, InputStream is) 
- 
Method SummaryModifier and TypeMethodDescriptionvoiddump(PrintWriter pw) voiddump(PrintWriter pw, int start) byte[]Returns a copy of the segment's contents, excluding the marker and length bytes at the beginning.protected bytegetSegmentData(int offset) Returns a specific byte of the segment's contents, excluding the marker and length bytes at the beginning.getSegmentDataAsString(Charset encoding) Convert the bytes to a StringMethods inherited from class org.apache.commons.imaging.formats.jpeg.segments.AbstractSegmentgetDescription, getSegmentType, toStringMethods inherited from class org.apache.commons.imaging.common.BinaryFileParserdebugNumber, debugNumber, getByteOrder, setByteOrder
- 
Constructor Details- 
AbstractGenericSegment
- 
AbstractGenericSegment- Throws:
- IOException
 
 
- 
- 
Method Details- 
dump- Overrides:
- dumpin class- AbstractSegment
 
- 
dump
- 
getSegmentDataReturns a copy of the segment's contents, excluding the marker and length bytes at the beginning.- Returns:
- the segment's contents
 
- 
getSegmentDataReturns a specific byte of the segment's contents, excluding the marker and length bytes at the beginning.- Parameters:
- offset- segment offset
- Returns:
- the bye in the segment's contents
- See Also:
 
- 
getSegmentDataAsStringConvert the bytes to a String- Parameters:
- encoding- segment encoding
- Returns:
- the encoded bytes
 
 
-