Package jcifs.smb

# Class SmbRandomAccessFile

java.lang.Object
jcifs.smb.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

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)`
`final boolean`
`readBoolean()`
`final byte`
`readByte()`
`final char`
`readChar()`
`final double`
`readDouble()`
`final float`
`readFloat()`
`final void`
`readFully(byte[] b)`
`final void`
`readFully(byte[] b, int off, int len)`
`final int`
`readInt()`
`final String`
`readLine()`
`final long`
`readLong()`
`final short`
`readShort()`
`final int`
`readUnsignedByte()`
`final int`
`readUnsignedShort()`
`final 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)`
`final void`
`writeBoolean(boolean v)`
`final void`
`writeByte(int v)`
`final void`
`writeBytes(String s)`
`final void`
`writeChar(int v)`
`final void`
`writeChars(String s)`
`final void`
`writeDouble(double v)`
`final void`
`writeFloat(float v)`
`final void`
`writeInt(int v)`
`final void`
`writeLong(long v)`
`final void`
`writeShort(int v)`
`final void`
`writeUTF(String str)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SmbRandomAccessFile

public SmbRandomAccessFile(String url, String mode, int shareAccess) throws SmbException, MalformedURLException, UnknownHostException

Throws:
  `SmbException`
  `MalformedURLException`
  `UnknownHostException`

### SmbRandomAccessFile

public SmbRandomAccessFile(SmbFile file, String mode) throws SmbException, MalformedURLException, UnknownHostException

Throws:
  `SmbException`
  `MalformedURLException`
  `UnknownHostException`

## Method Details

### 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 interface `DataInput`
Throws:
  `SmbException`

### readFully

public final void readFully(byte[] b, int off, int len) throws SmbException

Specified by:
  `readFully` in interface `DataInput`
Throws:
  `SmbException`

### skipBytes

public int skipBytes(int n) throws SmbException

Specified by:
  `skipBytes` in interface `DataInput`
Throws:
  `SmbException`

### write

public void write(int b) throws SmbException

Specified by:
  `write` in interface `DataOutput`
Throws:
  `SmbException`

### write

public void write(byte[] b) throws SmbException

Specified by:
  `write` in interface `DataOutput`
Throws:
  `SmbException`

### write

public void write(byte[] b, int off, int len) throws SmbException

Specified by:
  `write` in interface `DataOutput`
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 interface `DataInput`
Throws:
  `SmbException`

### readByte

public final byte readByte() throws SmbException

Specified by:
  `readByte` in interface `DataInput`
Throws:
  `SmbException`

### readUnsignedByte

public final int readUnsignedByte() throws SmbException

Specified by:
  `readUnsignedByte` in interface `DataInput`
Throws:
  `SmbException`

### readShort

public final short readShort() throws SmbException

Specified by:
  `readShort` in interface `DataInput`
Throws:
  `SmbException`

### readUnsignedShort

public final int readUnsignedShort() throws SmbException

Specified by:
  `readUnsignedShort` in interface `DataInput`
Throws:
  `SmbException`

### readChar

public final char readChar() throws SmbException

Specified by:
  `readChar` in interface `DataInput`
Throws:
  `SmbException`

### readInt

public final int readInt() throws SmbException

Specified by:
  `readInt` in interface `DataInput`
Throws:
  `SmbException`

### readLong

public final long readLong() throws SmbException

Specified by:
  `readLong` in interface `DataInput`
Throws:
  `SmbException`

### readFloat

public final float readFloat() throws SmbException

Specified by:
  `readFloat` in interface `DataInput`
Throws:
  `SmbException`

### readDouble

public final double readDouble() throws SmbException

Specified by:
  `readDouble` in interface `DataInput`
Throws:
  `SmbException`

### readLine

public final String readLine() throws SmbException

Specified by:
  `readLine` in interface `DataInput`
Throws:
  `SmbException`

### readUTF

public final String readUTF() throws SmbException

Specified by:
  `readUTF` in interface `DataInput`
Throws:
  `SmbException`

### writeBoolean

public final void writeBoolean(boolean v) throws SmbException

Specified by:
  `writeBoolean` in interface `DataOutput`
Throws:
  `SmbException`

### writeByte

public final void writeByte(int v) throws SmbException

Specified by:
  `writeByte` in interface `DataOutput`
Throws:
  `SmbException`

### writeShort

public final void writeShort(int v) throws SmbException

Specified by:
  `writeShort` in interface `DataOutput`
Throws:
  `SmbException`

### writeChar

public final void writeChar(int v) throws SmbException

Specified by:
  `writeChar` in interface `DataOutput`
Throws:
  `SmbException`

### writeInt

public final void writeInt(int v) throws SmbException

Specified by:
  `writeInt` in interface `DataOutput`
Throws:
  `SmbException`

### writeLong

public final void writeLong(long v) throws SmbException

Specified by:
  `writeLong` in interface `DataOutput`
Throws:
  `SmbException`

### writeFloat

public final void writeFloat(float v) throws SmbException

Specified by:
  `writeFloat` in interface `DataOutput`
Throws:
  `SmbException`

### writeDouble

public final void writeDouble(double v) throws SmbException

Specified by:
  `writeDouble` in interface `DataOutput`
Throws:
  `SmbException`

### writeBytes

public final void writeBytes(String s) throws SmbException

Specified by:
  `writeBytes` in interface `DataOutput`
Throws:
  `SmbException`

### writeChars

public final void writeChars(String s) throws SmbException

Specified by:
  `writeChars` in interface `DataOutput`
Throws:
  `SmbException`

### writeUTF

public final void writeUTF(String str) throws SmbException

Specified by:
  `writeUTF` in interface `DataOutput`
Throws:
  `SmbException`