public class FileHandle extends AbstractDataHandle<FileLocation>
DataHandle
for a FileLocation
.Constructor and Description |
---|
FileHandle() |
Modifier and Type | Method and Description |
---|---|
void |
close() |
String |
getMode() |
RandomAccessFile |
getRandomAccessFile()
Gets the random access file object backing this FileHandle.
|
Class<FileLocation> |
getType()
Gets the type associated with the object.
|
long |
length()
Returns the length of the stream.
|
long |
offset()
Returns the current offset in the stream.
|
int |
read()
Reads the next byte of data from the stream.
|
int |
read(byte[] b)
Reads up to b.length bytes of data from the stream into an array of bytes.
|
int |
read(byte[] b,
int off,
int len)
Reads up to len bytes of data from the stream into an array of bytes.
|
boolean |
readBoolean() |
byte |
readByte() |
char |
readChar() |
double |
readDouble() |
float |
readFloat() |
void |
readFully(byte[] b) |
void |
readFully(byte[] b,
int off,
int len) |
int |
readInt() |
String |
readLine() |
long |
readLong() |
short |
readShort() |
int |
readUnsignedByte() |
int |
readUnsignedShort() |
String |
readUTF() |
void |
seek(long pos)
Sets the stream pointer offset, measured from the beginning of the stream,
at which the next read or write occurs.
|
void |
setMode(String mode) |
int |
skipBytes(int n) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(String s) |
void |
writeChar(int v) |
void |
writeChars(String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeShort(int v) |
void |
writeUTF(String str) |
findString, findString, findString, findString, getEncoding, getOrder, isLittleEndian, read, read, readCString, readString, readString, setEncoding, setOrder, setOrder, skip, write, write
get, set
supports
compareTo, getInfo, getPriority, setInfo, setPriority, toString
context, getContext, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
get, set
context, getContext, setContext
getPriority, setPriority
compareTo
getInfo, setInfo
public RandomAccessFile getRandomAccessFile() throws IOException
IOException
public String getMode()
public void setMode(String mode)
public long offset() throws IOException
DataHandle
IOException
public long length() throws IOException
DataHandle
IOException
public int read() throws IOException
DataHandle
IOException
- - if an I/O error occurs.public int read(byte[] b) throws IOException
DataHandle
read
in interface DataHandle<FileLocation>
read
in class AbstractDataHandle<FileLocation>
IOException
public int read(byte[] b, int off, int len) throws IOException
DataHandle
IOException
public void seek(long pos) throws IOException
DataHandle
IOException
public boolean readBoolean() throws IOException
IOException
public byte readByte() throws IOException
IOException
public char readChar() throws IOException
IOException
public double readDouble() throws IOException
IOException
public float readFloat() throws IOException
IOException
public void readFully(byte[] b) throws IOException
IOException
public void readFully(byte[] b, int off, int len) throws IOException
IOException
public int readInt() throws IOException
IOException
public String readLine() throws IOException
IOException
public long readLong() throws IOException
IOException
public short readShort() throws IOException
IOException
public int readUnsignedByte() throws IOException
IOException
public int readUnsignedShort() throws IOException
IOException
public String readUTF() throws IOException
IOException
public int skipBytes(int n) throws IOException
IOException
public void write(byte[] b) throws IOException
IOException
public void write(byte[] b, int off, int len) throws IOException
IOException
public void write(int b) throws IOException
IOException
public void writeBoolean(boolean v) throws IOException
IOException
public void writeByte(int v) throws IOException
IOException
public void writeBytes(String s) throws IOException
IOException
public void writeChar(int v) throws IOException
IOException
public void writeChars(String s) throws IOException
IOException
public void writeDouble(double v) throws IOException
IOException
public void writeFloat(float v) throws IOException
IOException
public void writeInt(int v) throws IOException
IOException
public void writeLong(long v) throws IOException
IOException
public void writeShort(int v) throws IOException
IOException
public void writeUTF(String str) throws IOException
IOException
public void close() throws IOException
IOException
public Class<FileLocation> getType()
Typed
Copyright © 2009–2015 SciJava. All rights reserved.