public class BinaryFile extends Object
| Modifier and Type | Field and Description |
|---|---|
protected DataInputStream |
is |
protected String |
loc |
protected DataOutputStream |
os |
static boolean |
R |
static boolean |
W |
protected boolean |
writeable |
| Constructor and Description |
|---|
BinaryFile(String loc,
boolean mode) |
BinaryFile(String loc,
boolean mode,
int buffersize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
byte[] |
getWrittenHash() |
int |
read() |
boolean |
readBool() |
double |
readDouble() |
float |
readFloat() |
int |
readInt() |
long |
readLong() |
String |
readString() |
void |
write(int b) |
void |
writeBool(boolean b) |
void |
writeByte(byte b) |
void |
writeBytes(byte[] v) |
void |
writeDouble(double d) |
void |
writeFloat(float f) |
void |
writeInt(int v) |
void |
writeLong(long l) |
void |
writeString(String s) |
public static final boolean W
public static final boolean R
protected final DataOutputStream os
protected final DataInputStream is
protected final String loc
protected final boolean writeable
public BinaryFile(String loc, boolean mode) throws IOException
IOExceptionpublic BinaryFile(String loc, boolean mode, int buffersize) throws IOException
IOExceptionpublic void writeBytes(byte[] v)
throws IOException
IOExceptionpublic void writeInt(int v)
throws IOException
IOExceptionpublic void writeString(String s) throws IOException
IOExceptionpublic void writeBool(boolean b)
throws IOException
IOExceptionpublic void writeFloat(float f)
throws IOException
IOExceptionpublic void writeDouble(double d)
throws IOException
IOExceptionpublic void writeLong(long l)
throws IOException
IOExceptionpublic int readInt()
throws IOException,
EOFException
IOExceptionEOFExceptionpublic boolean readBool()
throws IOException,
EOFException
IOExceptionEOFExceptionpublic String readString() throws IOException, EOFException
IOExceptionEOFExceptionpublic float readFloat()
throws IOException,
EOFException
IOExceptionEOFExceptionpublic double readDouble()
throws IOException,
EOFException
IOExceptionEOFExceptionpublic long readLong()
throws IOException,
EOFException
IOExceptionEOFExceptionpublic void close()
throws IOException
IOExceptionpublic void writeByte(byte b)
throws IOException
IOExceptionpublic int read()
throws IOException
IOExceptionpublic void write(int b)
throws IOException
IOExceptionpublic byte[] getWrittenHash()
throws IOException
IOExceptionCopyright © 2015. All Rights Reserved.