public class RandomAccessImpl extends Object implements AbstractFileRandomAccess
Modifier and Type | Field and Description |
---|---|
protected File |
f |
protected RandomAccessFile |
raf |
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
getFilePointer() |
long |
length() |
int |
read(byte[] buf,
int off,
int len) |
void |
seek(long position) |
void |
setLength(long length) |
void |
write(byte[] buf,
int off,
int len) |
void |
write(int b) |
protected RandomAccessFile raf
protected File f
public void write(int b) throws IOException
IOException
public void write(byte[] buf, int off, int len) throws IOException
write
in interface AbstractFileRandomAccess
IOException
public void close() throws IOException
close
in interface AbstractFileRandomAccess
IOException
public void seek(long position) throws IOException
seek
in interface AbstractFileRandomAccess
IOException
public int read(byte[] buf, int off, int len) throws IOException
read
in interface AbstractFileRandomAccess
IOException
public void setLength(long length) throws IOException
setLength
in interface AbstractFileRandomAccess
IOException
public long getFilePointer() throws IOException
getFilePointer
in interface AbstractFileRandomAccess
IOException
public long length() throws IOException
length
in interface AbstractFileRandomAccess
IOException
Copyright © 2024. All rights reserved.