Class ExtraField.RawDataSegment
- java.lang.Object
-
- com.android.tools.build.apkzlib.zip.ExtraField.RawDataSegment
-
- All Implemented Interfaces:
ExtraField.Segment
- Enclosing class:
- ExtraField
public static class ExtraField.RawDataSegment extends java.lang.Object implements ExtraField.Segment
Segment of raw data: this class represents a general segment containing an array of bytes as data.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetHeaderId()Obtains the segment's header ID.intsize()Obtains the size of the segment including the header ID.voidwrite(java.nio.ByteBuffer out)Writes the segment to a buffer.
-
-
-
Method Detail
-
getHeaderId
public int getHeaderId()
Description copied from interface:ExtraField.SegmentObtains the segment's header ID.- Specified by:
getHeaderIdin interfaceExtraField.Segment- Returns:
- the segment's header ID
-
write
public void write(java.nio.ByteBuffer out) throws java.io.IOExceptionDescription copied from interface:ExtraField.SegmentWrites the segment to a buffer.- Specified by:
writein interfaceExtraField.Segment- Parameters:
out- the buffer where to write the segment to; exactlyExtraField.Segment.size()bytes will be written- Throws:
java.io.IOException- failed to write segment data
-
size
public int size()
Description copied from interface:ExtraField.SegmentObtains the size of the segment including the header ID.- Specified by:
sizein interfaceExtraField.Segment- Returns:
- the number of bytes needed to write the segment
-
-