public class FileAccess extends Object
| Constructor and Description |
|---|
FileAccess(File file,
RandomAccessFile randomAccessFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
File |
getFile() |
long |
getFilePointer() |
RandomAccessFile |
getRandomAccessFile() |
long |
length() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
byte |
readByte() |
char |
readChar() |
int |
readInt() |
long |
readLong() |
short |
readShort() |
String |
readString(int length) |
void |
seek(long pos) |
void |
setLength(long value) |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
writeByte(byte value) |
void |
writeChar(char value) |
void |
writeInt(int value) |
void |
writeLong(long value) |
void |
writeShort(short value) |
void |
writeString(String value,
int length) |
public FileAccess(File file, RandomAccessFile randomAccessFile)
public long readLong()
throws IOException
IOExceptionpublic void writeLong(long value)
throws IOException
IOExceptionpublic int readInt()
throws IOException
IOExceptionpublic void writeInt(int value)
throws IOException
IOExceptionpublic short readShort()
throws IOException
IOExceptionpublic void writeShort(short value)
throws IOException
IOExceptionpublic byte readByte()
throws IOException
IOExceptionpublic void writeByte(byte value)
throws IOException
IOExceptionpublic char readChar()
throws IOException
IOExceptionpublic void writeChar(char value)
throws IOException
IOExceptionpublic String readString(int length) throws IOException
IOExceptionpublic void writeString(String value, int length) throws IOException
IOExceptionpublic void seek(long pos)
throws IOException
IOExceptionpublic int read(byte[] b)
throws IOException
IOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic void write(byte[] b)
throws IOException
IOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
IOExceptionpublic long getFilePointer()
throws IOException
IOExceptionpublic long length()
throws IOException
IOExceptionpublic void setLength(long value)
throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic RandomAccessFile getRandomAccessFile()
public File getFile()
Copyright © 2016. All rights reserved.