|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nist.microanalysis.EPQTools.EndianRandomAccessFile
public class EndianRandomAccessFile
A class that implements DataInput and DataOutput for binary files in either little-endian or big-endian format.
Copyright: Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain
Institution: National Institute of Standards and Technology
| Field Summary | |
|---|---|
static java.lang.String |
BigEndian
BigEndian - Specifies that Big Endian ordering should be used. |
static java.lang.String |
LittleEndian
LittleEndian - Specifies that Little Endian ordering should be used. |
| Constructor Summary | |
|---|---|
EndianRandomAccessFile(java.io.File f,
java.lang.String rw,
java.lang.String endian)
EndianRandomAccessFile - Similar to the RandomAccessFile constructors except for the final argument. |
|
EndianRandomAccessFile(java.lang.String f,
java.lang.String rw,
java.lang.String endian)
EndianRandomAccessFile - Similar to the RandomAccessFile constructors except for the final argument. |
|
| Method Summary | |
|---|---|
void |
close()
like RandomAcessFile.close |
java.io.FileDescriptor |
getFD()
like RandomAcessFile.getFD(). |
long |
getFilePointer()
like RandomAcessFile.getFilePointer() |
long |
length()
like RandomAcessFile.length() |
int |
read()
like RandomAcessFile.read |
int |
read(byte[] b)
like RandomAcessFile.read |
int |
read(byte[] b,
int off,
int len)
like RandomAcessFile.read(...) |
boolean |
readBoolean()
like RandomAcessFile.readBoolean |
byte |
readByte()
like RandomAcessFile.readByte |
char |
readChar()
like RandomAcessFile.readChar except endianess depends upon constructor |
double |
readDouble()
like RandomAcessFile.readDouble except endianess depends upon constructor |
float |
readFloat()
like RandomAcessFile.readFloat except endianess depends upon constructor |
void |
readFully(byte[] b)
like RandomAcessFile.readFully |
void |
readFully(byte[] b,
int off,
int len)
like RandomAcessFile.readFully |
int |
readInt()
like RandomAcessFile.readInt except endianess depends upon constructor |
java.lang.String |
readLine()
like RandomAcessFile.readLine |
long |
readLong()
like RandomAcessFile.readLong except endianess depends upon constructor |
short |
readShort()
like RandomAcessFile.readShort except endianess depends upon constructor. |
int |
readUnsignedByte()
like RandomAcessFile.readUnsignedByte |
long |
readUnsignedInt()
like RandomAcessFile.readUnsignedShort except endianess depends upon constructor Note, returns long even though it reads an int. |
int |
readUnsignedShort()
like RandomAcessFile.readUnsignedShort except endianess depends upon constructor Note, returns int even though it reads a short. |
java.lang.String |
readUTF()
like RandomAcessFile.readUTF |
void |
seek(long pos)
like RandomAcessFile.seek |
int |
skipBytes(int n)
like RandomAcessFile.skipBytes |
void |
write(byte[] b)
like RandomAcessFile.write |
void |
write(byte[] b,
int off,
int len)
like RandomAcessFile.write |
void |
write(int b)
like RandomAcessFile.write |
void |
writeBoolean(boolean v)
like RandomAcessFile.writeBoolean |
void |
writeByte(int v)
like RandomAcessFile.writeByte |
void |
writeBytes(java.lang.String s)
like RandomAcessFile.writeBytes |
void |
writeChar(int v)
like RandomAcessFile.writeChar. |
void |
writeChars(java.lang.String s)
like RandomAcessFile.writeChars. |
void |
writeDouble(double v)
like RandomAcessFile.writeDouble. |
void |
writeFloat(float v)
like RandomAcessFile.writeFloat. |
void |
writeInt(int v)
like RandomAcessFile.writeInt. |
void |
writeLong(long v)
like RandomAcessFile.writeLong. |
void |
writeShort(int v)
like RandomAcessFile.writeShort. |
void |
writeUTF(java.lang.String str)
like RandomAcessFile.writeUTF |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String LittleEndian
public static final java.lang.String BigEndian
| Constructor Detail |
|---|
public EndianRandomAccessFile(java.lang.String f,
java.lang.String rw,
java.lang.String endian)
throws java.io.IOException
f - Stringrw - String As in RandomAccessFile mode "r", "rw", "rws", "rwd"endian - String - One of EndianRandomAccessFile.LittleEndian or
EndianRandomAccessFile.BigEndian
java.io.IOException
public EndianRandomAccessFile(java.io.File f,
java.lang.String rw,
java.lang.String endian)
throws java.io.IOException
f - Filerw - String As in RandomAccessFile mode "r", "rw", "rws", "rwd"endian - String - One of EndianRandomAccessFile.LittleEndian or
EndianRandomAccessFile.BigEndian
java.io.IOException| Method Detail |
|---|
public final short readShort()
throws java.io.IOException
readShort in interface java.io.DataInputjava.io.IOException
public final int readUnsignedShort()
throws java.io.IOException
readUnsignedShort in interface java.io.DataInputjava.io.IOException
public final long readUnsignedInt()
throws java.io.IOException
java.io.IOException
public final char readChar()
throws java.io.IOException
readChar in interface java.io.DataInputjava.io.IOException
public final int readInt()
throws java.io.IOException
readInt in interface java.io.DataInputjava.io.IOException
public final long readLong()
throws java.io.IOException
readLong in interface java.io.DataInputjava.io.IOException
public final float readFloat()
throws java.io.IOException
readFloat in interface java.io.DataInputjava.io.IOException
public final double readDouble()
throws java.io.IOException
readDouble in interface java.io.DataInputjava.io.IOException
public final void writeShort(int v)
throws java.io.IOException
writeShort in interface java.io.DataOutputjava.io.IOException
public final void writeChar(int v)
throws java.io.IOException
writeChar in interface java.io.DataOutputjava.io.IOException
public final void writeInt(int v)
throws java.io.IOException
writeInt in interface java.io.DataOutputjava.io.IOException
public final void writeLong(long v)
throws java.io.IOException
writeLong in interface java.io.DataOutputjava.io.IOException
public final void writeFloat(float v)
throws java.io.IOException
writeFloat in interface java.io.DataOutputjava.io.IOException
public final void writeDouble(double v)
throws java.io.IOException
writeDouble in interface java.io.DataOutputjava.io.IOException
public final void writeChars(java.lang.String s)
throws java.io.IOException
writeChars in interface java.io.DataOutputjava.io.IOException
public final java.io.FileDescriptor getFD()
throws java.io.IOException
java.io.IOException
public final long getFilePointer()
throws java.io.IOException
java.io.IOException
public final long length()
throws java.io.IOException
java.io.IOException
public final int read(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOException
public final int read(byte[] b)
throws java.io.IOException
java.io.IOException
public final int read()
throws java.io.IOException
java.io.IOException
public final void readFully(byte[] b)
throws java.io.IOException
readFully in interface java.io.DataInputjava.io.IOException
public final void readFully(byte[] b,
int off,
int len)
throws java.io.IOException
readFully in interface java.io.DataInputjava.io.IOException
public final int skipBytes(int n)
throws java.io.IOException
skipBytes in interface java.io.DataInputjava.io.IOException
public final boolean readBoolean()
throws java.io.IOException
readBoolean in interface java.io.DataInputjava.io.IOException
public final byte readByte()
throws java.io.IOException
readByte in interface java.io.DataInputjava.io.IOException
public final int readUnsignedByte()
throws java.io.IOException
readUnsignedByte in interface java.io.DataInputjava.io.IOException
public final java.lang.String readLine()
throws java.io.IOException
readLine in interface java.io.DataInputjava.io.IOException
public final java.lang.String readUTF()
throws java.io.IOException
readUTF in interface java.io.DataInputjava.io.IOException
public final void seek(long pos)
throws java.io.IOException
java.io.IOException
public final void write(int b)
throws java.io.IOException
write in interface java.io.DataOutputjava.io.IOException
public final void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in interface java.io.DataOutputjava.io.IOException
public final void writeBoolean(boolean v)
throws java.io.IOException
writeBoolean in interface java.io.DataOutputjava.io.IOException
public final void writeByte(int v)
throws java.io.IOException
writeByte in interface java.io.DataOutputjava.io.IOException
public final void writeBytes(java.lang.String s)
throws java.io.IOException
writeBytes in interface java.io.DataOutputjava.io.IOException
public final void writeUTF(java.lang.String str)
throws java.io.IOException
writeUTF in interface java.io.DataOutputjava.io.IOException
public final void write(byte[] b)
throws java.io.IOException
write in interface java.io.DataOutputjava.io.IOException
public final void close()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||