public final class GrowableByteArrayDataOutput extends DataOutput
DataOutput that can be used to build a byte[].| Modifier and Type | Field and Description |
|---|---|
byte[] |
bytes
The bytes
|
int |
length
The length
|
| Constructor and Description |
|---|
GrowableByteArrayDataOutput(int cp)
Create a
GrowableByteArrayDataOutput with the given initial capacity. |
| Modifier and Type | Method and Description |
|---|---|
void |
writeByte(byte b)
Writes a single byte.
|
void |
writeBytes(byte[] b,
int off,
int len)
Writes an array of bytes.
|
copyBytes, writeBytes, writeInt, writeLong, writeMapOfStrings, writeSetOfStrings, writeShort, writeString, writeStringSet, writeStringStringMap, writeVInt, writeVLong, writeZInt, writeZLongpublic GrowableByteArrayDataOutput(int cp)
GrowableByteArrayDataOutput with the given initial capacity.public void writeByte(byte b)
DataOutputThe most primitive data type is an eight-bit byte. Files are accessed as sequences of bytes. All other data types are defined as sequences of bytes, so file formats are byte-order independent.
writeByte in class DataOutputDataInput.readByte()public void writeBytes(byte[] b,
int off,
int len)
DataOutputwriteBytes in class DataOutputb - the bytes to writeoff - the offset in the byte arraylen - the number of bytes to writeDataInput.readBytes(byte[],int,int)Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.