|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.planx.io.AbstractPositionalData
org.planx.io.FileData
public class FileData
A PositionalData source that uses a File as data.
| Constructor Summary | |
|---|---|
FileData(File file)
|
|
FileData(File file,
SourceId id)
|
|
FileData(String name)
|
|
FileData(String name,
SourceId id)
|
|
| Method Summary | |
|---|---|
void |
close()
|
SourceId |
id()
Returns the current SourceId associated with the
data. |
Locator |
location()
Returns the current position in the data as a Locator. |
long |
position()
Returns the current position in the data as an long. |
void |
readInto(DataOutput out,
long length)
Writes to the output length bytes from the input. |
void |
seek(Locator l)
Positions the data source at the specified locator. |
void |
seek(long pos)
Positions the data source at the specified position. |
void |
setId(SourceId id)
|
void |
setSize(long size)
|
long |
size()
|
void |
write(DataInput in,
long length)
Writes to the output length bytes from the specified
DataInput. |
| Methods inherited from class org.planx.io.AbstractPositionalData |
|---|
isModified, isReadOnly, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setModified, setReadOnly, skipBytes, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileData(File file)
throws IOException
IOException
public FileData(String name)
throws IOException
IOException
public FileData(File file,
SourceId id)
throws IOException
IOException
public FileData(String name,
SourceId id)
throws IOException
IOException| Method Detail |
|---|
public void close()
throws IOException
IOExceptionpublic void setId(SourceId id)
public SourceId id()
PositionableSourceId associated with the
data. That is, the SourceId of the Locator
that will currently be returned by the Positionable.location() method.
id in interface Positionableid in class AbstractPositionalData
public void readInto(DataOutput out,
long length)
throws IOException
PositionalDataInputlength bytes from the input.
readInto in interface PositionalDataInputreadInto in class AbstractPositionalDataIOException - if an I/O error occurred.
public void write(DataInput in,
long length)
throws IOException
PositionalDataOutputlength bytes from the specified
DataInput.
write in interface PositionalDataOutputwrite in class AbstractPositionalDataIOException - if an I/O error occurred.
public long size()
throws IOException
IOException
public void setSize(long size)
throws IOException
IOException
public Locator location()
throws IOException
PositionableLocator.
location in interface Positionablelocation in class AbstractPositionalDataIOException - if an I/O error occurred.
public long position()
throws IOException
Positionablelong.
position in interface Positionableposition in class AbstractPositionalDataIOException - if an I/O error occurred.
public void seek(Locator l)
throws IOException,
InvalidSourceIdException
Positionable
seek in interface Positionableseek in class AbstractPositionalDataIOException - if an I/O error occurred.
InvalidSourceIdException
public void seek(long pos)
throws IOException
Positionable
seek in interface Positionableseek in class AbstractPositionalDataIOException - if an I/O error occurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||