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(int offset)
Reads a 16-bit character from the buffer at the given offset.
|
double |
readDouble(int offset)
Reads a double-precision 64-bit floating point number from the buffer at the given offset.
|
float |
readFloat(int offset)
Reads a single-precision 32-bit floating point number from the buffer at the given offset.
|
int |
readInt(int offset)
Reads a 32-bit signed integer from the buffer at the given offset.
|
long |
readLong(int offset)
Reads a 64-bit signed integer from the buffer at the given offset.
|
int |
readMedium(int offset)
Reads a 24-bit signed integer from the buffer at the given offset.
|
short |
readShort(int offset)
Reads a 16-bit signed integer from the buffer at the given offset.
|
long |
readUnsignedInt(int offset)
Reads a 32-bit unsigned integer from the buffer at the given offset.
|
int |
readUnsignedMedium(int offset)
Reads a 24-bin unsigned integer from the buffer at the given offset.
|
int |
readUnsignedShort(int offset)
Reads a 16-bit unsigned integer from the buffer at the given offset.
|
Bytes |
writeChar(int offset,
char c)
Writes a 16-bit character to the buffer at the given offset.
|
Bytes |
writeDouble(int offset,
double d)
Writes a double-precision 64-bit floating point number to the buffer at the given offset.
|
Bytes |
writeFloat(int offset,
float f)
Writes a single-precision 32-bit floating point number to the buffer at the given offset.
|
Bytes |
writeInt(int offset,
int i)
Writes a 32-bit signed integer to the buffer at the given offset.
|
Bytes |
writeLong(int offset,
long l)
Writes a 64-bit signed integer to the buffer at the given offset.
|
Bytes |
writeMedium(int offset,
int m)
Writes a 24-bit signed integer to the buffer at the given offset.
|
Bytes |
writeShort(int offset,
short s)
Writes a 16-bit signed integer to the buffer at the given offset.
|
Bytes |
writeUnsignedInt(int offset,
long i)
Writes a 32-bit unsigned integer to the buffer at the given offset.
|
Bytes |
writeUnsignedMedium(int offset,
int m)
Writes a 24-bit unsigned integer to the buffer at the given offset.
|
Bytes |
writeUnsignedShort(int 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, order, readString, writeStringpublic 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(int offset)
BytesInputreadChar in interface BytesInput<Bytes>readChar in class WrappedBytesoffset - The offset at which to read the character.public short readShort(int offset)
BytesInputreadShort in interface BytesInput<Bytes>readShort in class WrappedBytesoffset - The offset at which to read the short.public int readUnsignedShort(int offset)
BytesInputreadUnsignedShort in interface BytesInput<Bytes>readUnsignedShort in class WrappedBytesoffset - The offset at which to read the short.public int readMedium(int offset)
BytesInputreadMedium in interface BytesInput<Bytes>readMedium in class WrappedBytesoffset - The offset at which to read the integer.public int readUnsignedMedium(int offset)
BytesInputreadUnsignedMedium in interface BytesInput<Bytes>readUnsignedMedium in class WrappedBytesoffset - The offset at which to read the integer.public int readInt(int offset)
BytesInputreadInt in interface BytesInput<Bytes>readInt in class WrappedBytesoffset - The offset at which to read the integer.public long readUnsignedInt(int offset)
BytesInputreadUnsignedInt in interface BytesInput<Bytes>readUnsignedInt in class WrappedBytesoffset - The offset at which to read the integer.public long readLong(int offset)
BytesInputreadLong in interface BytesInput<Bytes>readLong in class WrappedBytesoffset - The offset at which to read the long.public float readFloat(int offset)
BytesInputreadFloat in interface BytesInput<Bytes>readFloat in class WrappedBytesoffset - The offset at which to read the float.public double readDouble(int offset)
BytesInputreadDouble in interface BytesInput<Bytes>readDouble in class WrappedBytesoffset - The offset at which to read the double.public Bytes writeChar(int 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(int 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(int 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(int 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(int 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(int 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(int 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(int 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(int 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(int 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–2017. All rights reserved.