public class SwappedBytes extends WrappedBytes
| Constructor and Description |
|---|
SwappedBytes(Bytes bytes) |
| Modifier and Type | Method and Description |
|---|---|
ByteOrder |
order()
Returns the byte order.
|
char |
readChar(long offset)
Reads a 16-bit character from the buffer at the given offset.
|
double |
readDouble(long offset)
Reads a double-precision 64-bit floating point number from the buffer at the given offset.
|
float |
readFloat(long offset)
Reads a single-precision 32-bit floating point number from the buffer at the given offset.
|
int |
readInt(long offset)
Reads a 32-bit signed integer from the buffer at the given offset.
|
long |
readLong(long offset)
Reads a 64-bit signed integer from the buffer at the given offset.
|
int |
readMedium(long offset)
Reads a 24-bit signed integer from the buffer at the given offset.
|
short |
readShort(long offset)
Reads a 16-bit signed integer from the buffer at the given offset.
|
long |
readUnsignedInt(long offset)
Reads a 32-bit unsigned integer from the buffer at the given offset.
|
int |
readUnsignedMedium(long offset)
Reads a 24-bin unsigned integer from the buffer at the given offset.
|
int |
readUnsignedShort(long offset)
Reads a 16-bit unsigned integer from the buffer at the given offset.
|
Bytes |
writeChar(long offset,
char c)
Writes a 16-bit character to the buffer at the given offset.
|
Bytes |
writeDouble(long offset,
double d)
Writes a double-precision 64-bit floating point number to the buffer at the given offset.
|
Bytes |
writeFloat(long offset,
float f)
Writes a single-precision 32-bit floating point number to the buffer at the given offset.
|
Bytes |
writeInt(long offset,
int i)
Writes a 32-bit signed integer to the buffer at the given offset.
|
Bytes |
writeLong(long offset,
long l)
Writes a 64-bit signed integer to the buffer at the given offset.
|
Bytes |
writeMedium(long offset,
int m)
Writes a 24-bit signed integer to the buffer at the given offset.
|
Bytes |
writeShort(long offset,
short s)
Writes a 16-bit signed integer to the buffer at the given offset.
|
Bytes |
writeUnsignedInt(long offset,
long i)
Writes a 32-bit unsigned integer to the buffer at the given offset.
|
Bytes |
writeUnsignedMedium(long offset,
int m)
Writes a 24-bit unsigned integer to the buffer at the given offset.
|
Bytes |
writeUnsignedShort(long offset,
int s)
Writes a 16-bit unsigned integer to the buffer at the given offset.
|
close, flush, read, read, readBoolean, readByte, readString, readUnsignedByte, readUTF8, resize, root, size, write, write, writeBoolean, writeByte, writeString, writeUnsignedByte, writeUTF8, zero, zero, zeroisDirect, isFile, orderpublic SwappedBytes(Bytes bytes)
public ByteOrder order()
Bytes
For consistency with ByteBuffer, all bytes implementations are initially in ByteOrder.BIG_ENDIAN order.
order in interface Bytesorder in class WrappedBytespublic char readChar(long offset)
BytesInputreadChar in interface BytesInput<Bytes>readChar in class WrappedBytesoffset - The offset at which to read the character.public short readShort(long offset)
BytesInputreadShort in interface BytesInput<Bytes>readShort in class WrappedBytesoffset - The offset at which to read the short.public int readUnsignedShort(long offset)
BytesInputreadUnsignedShort in interface BytesInput<Bytes>readUnsignedShort in class WrappedBytesoffset - The offset at which to read the short.public int readMedium(long offset)
BytesInputreadMedium in interface BytesInput<Bytes>readMedium in class WrappedBytesoffset - The offset at which to read the integer.public int readUnsignedMedium(long offset)
BytesInputreadUnsignedMedium in interface BytesInput<Bytes>readUnsignedMedium in class WrappedBytesoffset - The offset at which to read the integer.public int readInt(long offset)
BytesInputreadInt in interface BytesInput<Bytes>readInt in class WrappedBytesoffset - The offset at which to read the integer.public long readUnsignedInt(long offset)
BytesInputreadUnsignedInt in interface BytesInput<Bytes>readUnsignedInt in class WrappedBytesoffset - The offset at which to read the integer.public long readLong(long offset)
BytesInputreadLong in interface BytesInput<Bytes>readLong in class WrappedBytesoffset - The offset at which to read the long.public float readFloat(long offset)
BytesInputreadFloat in interface BytesInput<Bytes>readFloat in class WrappedBytesoffset - The offset at which to read the float.public double readDouble(long offset)
BytesInputreadDouble in interface BytesInput<Bytes>readDouble in class WrappedBytesoffset - The offset at which to read the double.public Bytes writeChar(long offset, char c)
BytesOutputwriteChar in interface BytesOutput<Bytes>writeChar in class WrappedBytesoffset - The offset at which to write the character.c - The character to write.public Bytes writeShort(long offset, short s)
BytesOutputwriteShort in interface BytesOutput<Bytes>writeShort in class WrappedBytesoffset - The offset at which to write the short.s - The short to write.public Bytes writeUnsignedShort(long offset, int s)
BytesOutputwriteUnsignedShort in interface BytesOutput<Bytes>writeUnsignedShort in class WrappedBytesoffset - The offset at which to write the short.s - The short to write.public Bytes writeMedium(long offset, int m)
BytesOutputwriteMedium in interface BytesOutput<Bytes>writeMedium in class WrappedBytesoffset - The offset at which to write the short.m - The short to write.public Bytes writeUnsignedMedium(long offset, int m)
BytesOutputwriteUnsignedMedium in interface BytesOutput<Bytes>writeUnsignedMedium in class WrappedBytesoffset - The offset at which to write the short.m - The short to write.public Bytes writeInt(long offset, int i)
BytesOutputwriteInt in interface BytesOutput<Bytes>writeInt in class WrappedBytesoffset - The offset at which to write the integer.i - The integer to write.public Bytes writeUnsignedInt(long offset, long i)
BytesOutputwriteUnsignedInt in interface BytesOutput<Bytes>writeUnsignedInt in class WrappedBytesoffset - The offset at which to write the integer.i - The integer to write.public Bytes writeLong(long offset, long l)
BytesOutputwriteLong in interface BytesOutput<Bytes>writeLong in class WrappedBytesoffset - The offset at which to write the long.l - The long to write.public Bytes writeFloat(long offset, float f)
BytesOutputwriteFloat in interface BytesOutput<Bytes>writeFloat in class WrappedBytesoffset - The offset at which to write the float.f - The float to write.public Bytes writeDouble(long offset, double d)
BytesOutputwriteDouble in interface BytesOutput<Bytes>writeDouble in class WrappedBytesoffset - The offset at which to write the double.d - The double to write.Copyright © 2013–2015. All rights reserved.