public class EndianSwitchableInputStream extends FilterInputStream implements DataInput
DataInputStream that allows changing the endianness of data. By default, everything in Java is big-endianin| Constructor and Description |
|---|
EndianSwitchableInputStream(InputStream stream,
ByteOrder endianness) |
| Modifier and Type | Method and Description |
|---|---|
protected DataInputStream |
getBackingStream() |
ByteOrder |
getEndianness() |
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] bytes) |
void |
readFully(byte[] bytes,
int i,
int i1) |
int |
readInt() |
String |
readLine() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
int |
skipBytes(int i) |
available, close, mark, markSupported, read, read, read, reset, skippublic EndianSwitchableInputStream(InputStream stream, ByteOrder endianness)
public ByteOrder getEndianness()
protected DataInputStream getBackingStream()
public void readFully(byte[] bytes)
throws IOException
readFully in interface DataInputIOExceptionpublic void readFully(byte[] bytes,
int i,
int i1)
throws IOException
readFully in interface DataInputIOExceptionpublic int skipBytes(int i)
throws IOException
skipBytes in interface DataInputIOExceptionpublic boolean readBoolean()
throws IOException
readBoolean in interface DataInputIOExceptionpublic byte readByte()
throws IOException
readByte in interface DataInputIOExceptionpublic int readUnsignedByte()
throws IOException
readUnsignedByte in interface DataInputIOExceptionpublic short readShort()
throws IOException
readShort in interface DataInputIOExceptionpublic int readUnsignedShort()
throws IOException
readUnsignedShort in interface DataInputIOExceptionpublic char readChar()
throws IOException
readChar in interface DataInputIOExceptionpublic int readInt()
throws IOException
readInt in interface DataInputIOExceptionpublic long readLong()
throws IOException
readLong in interface DataInputIOExceptionpublic float readFloat()
throws IOException
readFloat in interface DataInputIOExceptionpublic double readDouble()
throws IOException
readDouble in interface DataInputIOExceptionpublic String readLine() throws IOException
readLine in interface DataInputIOExceptionpublic String readUTF() throws IOException
readUTF in interface DataInputIOExceptionCopyright © 2011–2014 Flow Powered. All rights reserved.