public interface SmbRandomAccess extends DataOutput, DataInput, AutoCloseable
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the file
|
long |
getFilePointer()
Current position in file
|
long |
length()
Get the current file length
|
int |
read()
Read a single byte from the current position
|
int |
read(byte[] b)
Read into buffer from current position
|
int |
read(byte[] b,
int off,
int len)
Read into buffer from current position
|
void |
seek(long pos)
Seek to new position
|
void |
setLength(long newLength)
Expand/truncate file length
|
write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes
void close() throws SmbException
close
in interface AutoCloseable
SmbException
int read() throws SmbException
SmbException
int read(byte[] b) throws SmbException
b
- bufferSmbException
int read(byte[] b, int off, int len) throws SmbException
b
- bufferoff
- offset into bufferlen
- read up to len bytesSmbException
long getFilePointer()
void seek(long pos)
pos
- long length() throws SmbException
SmbException
void setLength(long newLength) throws SmbException
newLength
- new file lengthSmbException
Copyright © 2020. All rights reserved.