public abstract class GenericSegment extends Segment
Constructor and Description |
---|
GenericSegment(int marker,
byte[] bytes) |
GenericSegment(int marker,
int markerLength,
InputStream is) |
Modifier and Type | Method and Description |
---|---|
void |
dump(PrintWriter pw) |
void |
dump(PrintWriter pw,
int start) |
byte[] |
getSegmentData()
Returns a copy of the segment's contents,
excluding the marker and length bytes at
the beginning.
|
protected byte |
getSegmentData(int offset)
Returns a specific byte of the segment's contents,
excluding the marker and length bytes at
the beginning.
|
String |
getSegmentDataAsString(String encoding)
Convert the bytes to a String
|
getDescription, getSegmentType, toString
debugNumber, debugNumber, getByteOrder, setByteOrder
public GenericSegment(int marker, int markerLength, InputStream is) throws IOException
IOException
public GenericSegment(int marker, byte[] bytes)
public void dump(PrintWriter pw)
public void dump(PrintWriter pw, int start)
public byte[] getSegmentData()
protected byte getSegmentData(int offset)
offset
- segment offsetgetSegmentData()
public String getSegmentDataAsString(String encoding) throws UnsupportedEncodingException
encoding
- segment encodingUnsupportedEncodingException
- if the encoding provided is not supportedCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.