Package jcifs.smb1.smb1
Class SmbRandomAccessFile
- java.lang.Object
-
- jcifs.smb1.smb1.SmbRandomAccessFile
-
- All Implemented Interfaces:
DataInput
,DataOutput
public class SmbRandomAccessFile extends Object implements DataOutput, DataInput
-
-
Constructor Summary
Constructors Constructor Description SmbRandomAccessFile(String url, String mode, int shareAccess)
SmbRandomAccessFile(SmbFile file, String mode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
long
getFilePointer()
long
length()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
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)
void
setLength(long newLength)
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)
-
-
-
Constructor Detail
-
SmbRandomAccessFile
public SmbRandomAccessFile(String url, String mode, int shareAccess) throws SmbException, MalformedURLException, UnknownHostException
-
SmbRandomAccessFile
public SmbRandomAccessFile(SmbFile file, String mode) throws SmbException, MalformedURLException, UnknownHostException
-
-
Method Detail
-
read
public int read() throws SmbException
- Throws:
SmbException
-
read
public int read(byte[] b) throws SmbException
- Throws:
SmbException
-
read
public int read(byte[] b, int off, int len) throws SmbException
- Throws:
SmbException
-
readFully
public final void readFully(byte[] b) throws SmbException
- Specified by:
readFully
in interfaceDataInput
- Throws:
SmbException
-
readFully
public final void readFully(byte[] b, int off, int len) throws SmbException
- Specified by:
readFully
in interfaceDataInput
- Throws:
SmbException
-
skipBytes
public int skipBytes(int n) throws SmbException
- Specified by:
skipBytes
in interfaceDataInput
- Throws:
SmbException
-
write
public void write(int b) throws SmbException
- Specified by:
write
in interfaceDataOutput
- Throws:
SmbException
-
write
public void write(byte[] b) throws SmbException
- Specified by:
write
in interfaceDataOutput
- Throws:
SmbException
-
write
public void write(byte[] b, int off, int len) throws SmbException
- Specified by:
write
in interfaceDataOutput
- Throws:
SmbException
-
getFilePointer
public long getFilePointer() throws SmbException
- Throws:
SmbException
-
seek
public void seek(long pos) throws SmbException
- Throws:
SmbException
-
length
public long length() throws SmbException
- Throws:
SmbException
-
setLength
public void setLength(long newLength) throws SmbException
- Throws:
SmbException
-
close
public void close() throws SmbException
- Throws:
SmbException
-
readBoolean
public final boolean readBoolean() throws SmbException
- Specified by:
readBoolean
in interfaceDataInput
- Throws:
SmbException
-
readByte
public final byte readByte() throws SmbException
- Specified by:
readByte
in interfaceDataInput
- Throws:
SmbException
-
readUnsignedByte
public final int readUnsignedByte() throws SmbException
- Specified by:
readUnsignedByte
in interfaceDataInput
- Throws:
SmbException
-
readShort
public final short readShort() throws SmbException
- Specified by:
readShort
in interfaceDataInput
- Throws:
SmbException
-
readUnsignedShort
public final int readUnsignedShort() throws SmbException
- Specified by:
readUnsignedShort
in interfaceDataInput
- Throws:
SmbException
-
readChar
public final char readChar() throws SmbException
- Specified by:
readChar
in interfaceDataInput
- Throws:
SmbException
-
readInt
public final int readInt() throws SmbException
- Specified by:
readInt
in interfaceDataInput
- Throws:
SmbException
-
readLong
public final long readLong() throws SmbException
- Specified by:
readLong
in interfaceDataInput
- Throws:
SmbException
-
readFloat
public final float readFloat() throws SmbException
- Specified by:
readFloat
in interfaceDataInput
- Throws:
SmbException
-
readDouble
public final double readDouble() throws SmbException
- Specified by:
readDouble
in interfaceDataInput
- Throws:
SmbException
-
readLine
public final String readLine() throws SmbException
- Specified by:
readLine
in interfaceDataInput
- Throws:
SmbException
-
readUTF
public final String readUTF() throws SmbException
- Specified by:
readUTF
in interfaceDataInput
- Throws:
SmbException
-
writeBoolean
public final void writeBoolean(boolean v) throws SmbException
- Specified by:
writeBoolean
in interfaceDataOutput
- Throws:
SmbException
-
writeByte
public final void writeByte(int v) throws SmbException
- Specified by:
writeByte
in interfaceDataOutput
- Throws:
SmbException
-
writeShort
public final void writeShort(int v) throws SmbException
- Specified by:
writeShort
in interfaceDataOutput
- Throws:
SmbException
-
writeChar
public final void writeChar(int v) throws SmbException
- Specified by:
writeChar
in interfaceDataOutput
- Throws:
SmbException
-
writeInt
public final void writeInt(int v) throws SmbException
- Specified by:
writeInt
in interfaceDataOutput
- Throws:
SmbException
-
writeLong
public final void writeLong(long v) throws SmbException
- Specified by:
writeLong
in interfaceDataOutput
- Throws:
SmbException
-
writeFloat
public final void writeFloat(float v) throws SmbException
- Specified by:
writeFloat
in interfaceDataOutput
- Throws:
SmbException
-
writeDouble
public final void writeDouble(double v) throws SmbException
- Specified by:
writeDouble
in interfaceDataOutput
- Throws:
SmbException
-
writeBytes
public final void writeBytes(String s) throws SmbException
- Specified by:
writeBytes
in interfaceDataOutput
- Throws:
SmbException
-
writeChars
public final void writeChars(String s) throws SmbException
- Specified by:
writeChars
in interfaceDataOutput
- Throws:
SmbException
-
writeUTF
public final void writeUTF(String str) throws SmbException
- Specified by:
writeUTF
in interfaceDataOutput
- Throws:
SmbException
-
-