public class PathRandomAccessImpl
extends java.lang.Object
implements com.sshtools.common.files.AbstractFileRandomAccess
Modifier and Type | Field and Description |
---|---|
protected java.nio.file.Path |
f |
protected java.nio.channels.FileChannel |
raf |
Constructor and Description |
---|
PathRandomAccessImpl(java.nio.file.Path f,
boolean writeAccess) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
long |
getFilePointer() |
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) |
public PathRandomAccessImpl(java.nio.file.Path f, boolean writeAccess) throws java.io.IOException
java.io.IOException
public void write(int b) throws java.io.IOException
java.io.IOException
public void write(byte[] buf, int off, int len) throws java.io.IOException
write
in interface com.sshtools.common.files.AbstractFileRandomAccess
java.io.IOException
public void close() throws java.io.IOException
close
in interface com.sshtools.common.files.AbstractFileRandomAccess
java.io.IOException
public void seek(long position) throws java.io.IOException
seek
in interface com.sshtools.common.files.AbstractFileRandomAccess
java.io.IOException
public int read(byte[] buf, int off, int len) throws java.io.IOException
read
in interface com.sshtools.common.files.AbstractFileRandomAccess
java.io.IOException
public void setLength(long length) throws java.io.IOException
setLength
in interface com.sshtools.common.files.AbstractFileRandomAccess
java.io.IOException
public long getFilePointer() throws java.io.IOException
getFilePointer
in interface com.sshtools.common.files.AbstractFileRandomAccess
java.io.IOException
Copyright © 2023. All rights reserved.