java.lang.ObjectFixedLengthStringIO
public class FixedLengthStringIO
A class whose methods write and retrieve fixed-length strings.
Constructor Summary | |
---|---|
FixedLengthStringIO()
|
Method Summary | |
---|---|
static java.lang.String |
readFixedLengthString(int size,
java.io.DataInput inFile)
Reads and returns a string of fixed-length size from a RandomAccessFile object. |
static void |
writeFixedLengthString(java.lang.String outString,
int size,
java.io.DataOutput outFile)
Writes a string of fixed-length size to a RandomAccessFile object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FixedLengthStringIO()
Method Detail |
---|
public static java.lang.String readFixedLengthString(int size, java.io.DataInput inFile) throws java.io.IOException
size
- an int which is the number of characters to readinfile
- the RandomAccess file object which is assigned
to the DataInput object
java.io.IOException
public static void writeFixedLengthString(java.lang.String outString, int size, java.io.DataOutput outFile) throws java.io.IOException
outString
- the string to be written to the RandomAccessFile objectsize
- an int which is the number of characters to be writtenoutfile
- the RandomAccess file object which is assigned
to the DataOutput object
java.io.IOException