パッケージ jcifs.smb
クラス SmbRandomAccessFile
- java.lang.Object
-
- jcifs.smb.SmbRandomAccessFile
-
- すべての実装されたインタフェース:
DataInput
,DataOutput
,AutoCloseable
,SmbRandomAccess
public class SmbRandomAccessFile extends Object implements SmbRandomAccess
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 SmbRandomAccessFile(String url, String mode, int sharing, CIFSContext tc)
Instantiate a random access file from URLSmbRandomAccessFile(SmbFile file, String mode)
Instantiate a random access file from aSmbFile
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 void
close()
Close the filelong
getFilePointer()
Current position in filelong
length()
Get the current file lengthvoid
open()
Ensures that the file descriptor is openendint
read()
Read a single byte from the current positionint
read(byte[] b)
Read into buffer from current positionint
read(byte[] b, int off, int len)
Read into buffer from current positionboolean
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)
Seek to new positionvoid
setLength(long newLength)
Expand/truncate file lengthint
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)
-
-
-
コンストラクタの詳細
-
SmbRandomAccessFile
public SmbRandomAccessFile(String url, String mode, int sharing, CIFSContext tc) throws SmbException, MalformedURLException
Instantiate a random access file from URL- パラメータ:
url
-mode
-sharing
-tc
-- 例外:
SmbException
MalformedURLException
-
SmbRandomAccessFile
public SmbRandomAccessFile(SmbFile file, String mode) throws SmbException
Instantiate a random access file from aSmbFile
- パラメータ:
file
-mode
-- 例外:
SmbException
-
-
メソッドの詳細
-
open
public void open() throws CIFSException
Ensures that the file descriptor is openend- 例外:
CIFSException
-
close
public void close() throws SmbException
インタフェースからコピーされた説明:SmbRandomAccess
Close the file- 定義:
close
インタフェース内AutoCloseable
- 定義:
close
インタフェース内SmbRandomAccess
- 例外:
SmbException
-
read
public int read() throws SmbException
インタフェースからコピーされた説明:SmbRandomAccess
Read a single byte from the current position- 定義:
read
インタフェース内SmbRandomAccess
- 戻り値:
- read byte, -1 if EOF
- 例外:
SmbException
-
read
public int read(byte[] b) throws SmbException
インタフェースからコピーされた説明:SmbRandomAccess
Read into buffer from current position- 定義:
read
インタフェース内SmbRandomAccess
- パラメータ:
b
- buffer- 戻り値:
- number of bytes read
- 例外:
SmbException
-
read
public int read(byte[] b, int off, int len) throws SmbException
インタフェースからコピーされた説明:SmbRandomAccess
Read into buffer from current position- 定義:
read
インタフェース内SmbRandomAccess
- パラメータ:
b
- bufferoff
- offset into bufferlen
- read up to len bytes- 戻り値:
- number of bytes read
- 例外:
SmbException
-
readFully
public final void readFully(byte[] b) throws SmbException
- 定義:
readFully
インタフェース内DataInput
- 例外:
SmbException
-
readFully
public final void readFully(byte[] b, int off, int len) throws SmbException
- 定義:
readFully
インタフェース内DataInput
- 例外:
SmbException
-
skipBytes
public int skipBytes(int n) throws SmbException
- 定義:
skipBytes
インタフェース内DataInput
- 例外:
SmbException
-
write
public void write(int b) throws SmbException
- 定義:
write
インタフェース内DataOutput
- 例外:
SmbException
-
write
public void write(byte[] b) throws SmbException
- 定義:
write
インタフェース内DataOutput
- 例外:
SmbException
-
write
public void write(byte[] b, int off, int len) throws SmbException
- 定義:
write
インタフェース内DataOutput
- 例外:
SmbException
-
getFilePointer
public long getFilePointer()
インタフェースからコピーされた説明:SmbRandomAccess
Current position in file- 定義:
getFilePointer
インタフェース内SmbRandomAccess
- 戻り値:
- current position
-
seek
public void seek(long pos)
インタフェースからコピーされた説明:SmbRandomAccess
Seek to new position- 定義:
seek
インタフェース内SmbRandomAccess
-
length
public long length() throws SmbException
インタフェースからコピーされた説明:SmbRandomAccess
Get the current file length- 定義:
length
インタフェース内SmbRandomAccess
- 戻り値:
- file length
- 例外:
SmbException
-
setLength
public void setLength(long newLength) throws SmbException
インタフェースからコピーされた説明:SmbRandomAccess
Expand/truncate file length- 定義:
setLength
インタフェース内SmbRandomAccess
- パラメータ:
newLength
- new file length- 例外:
SmbException
-
readBoolean
public final boolean readBoolean() throws SmbException
- 定義:
readBoolean
インタフェース内DataInput
- 例外:
SmbException
-
readByte
public final byte readByte() throws SmbException
- 定義:
readByte
インタフェース内DataInput
- 例外:
SmbException
-
readUnsignedByte
public final int readUnsignedByte() throws SmbException
- 定義:
readUnsignedByte
インタフェース内DataInput
- 例外:
SmbException
-
readShort
public final short readShort() throws SmbException
- 定義:
readShort
インタフェース内DataInput
- 例外:
SmbException
-
readUnsignedShort
public final int readUnsignedShort() throws SmbException
- 定義:
readUnsignedShort
インタフェース内DataInput
- 例外:
SmbException
-
readChar
public final char readChar() throws SmbException
- 定義:
readChar
インタフェース内DataInput
- 例外:
SmbException
-
readInt
public final int readInt() throws SmbException
- 定義:
readInt
インタフェース内DataInput
- 例外:
SmbException
-
readLong
public final long readLong() throws SmbException
- 定義:
readLong
インタフェース内DataInput
- 例外:
SmbException
-
readFloat
public final float readFloat() throws SmbException
- 定義:
readFloat
インタフェース内DataInput
- 例外:
SmbException
-
readDouble
public final double readDouble() throws SmbException
- 定義:
readDouble
インタフェース内DataInput
- 例外:
SmbException
-
readLine
public final String readLine() throws SmbException
- 定義:
readLine
インタフェース内DataInput
- 例外:
SmbException
-
readUTF
public final String readUTF() throws SmbException
- 定義:
readUTF
インタフェース内DataInput
- 例外:
SmbException
-
writeBoolean
public final void writeBoolean(boolean v) throws SmbException
- 定義:
writeBoolean
インタフェース内DataOutput
- 例外:
SmbException
-
writeByte
public final void writeByte(int v) throws SmbException
- 定義:
writeByte
インタフェース内DataOutput
- 例外:
SmbException
-
writeShort
public final void writeShort(int v) throws SmbException
- 定義:
writeShort
インタフェース内DataOutput
- 例外:
SmbException
-
writeChar
public final void writeChar(int v) throws SmbException
- 定義:
writeChar
インタフェース内DataOutput
- 例外:
SmbException
-
writeInt
public final void writeInt(int v) throws SmbException
- 定義:
writeInt
インタフェース内DataOutput
- 例外:
SmbException
-
writeLong
public final void writeLong(long v) throws SmbException
- 定義:
writeLong
インタフェース内DataOutput
- 例外:
SmbException
-
writeFloat
public final void writeFloat(float v) throws SmbException
- 定義:
writeFloat
インタフェース内DataOutput
- 例外:
SmbException
-
writeDouble
public final void writeDouble(double v) throws SmbException
- 定義:
writeDouble
インタフェース内DataOutput
- 例外:
SmbException
-
writeBytes
public final void writeBytes(String s) throws SmbException
- 定義:
writeBytes
インタフェース内DataOutput
- 例外:
SmbException
-
writeChars
public final void writeChars(String s) throws SmbException
- 定義:
writeChars
インタフェース内DataOutput
- 例外:
SmbException
-
writeUTF
public final void writeUTF(String str) throws SmbException
- 定義:
writeUTF
インタフェース内DataOutput
- 例外:
SmbException
-
-