public class SmbRandomAccessFile extends Object implements SmbRandomAccess
コンストラクタと説明 |
---|
SmbRandomAccessFile(SmbFile file,
String mode)
Instantiate a random access file from a
SmbFile |
SmbRandomAccessFile(String url,
String mode,
int sharing,
CIFSContext tc)
Instantiate a random access file from URL
|
修飾子とタイプ | メソッドと説明 |
---|---|
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
|
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)
Seek to new position
|
void |
setLength(long newLength)
Expand/truncate file length
|
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) |
public SmbRandomAccessFile(String url, String mode, int sharing, CIFSContext tc) throws SmbException, MalformedURLException
url
- mode
- sharing
- tc
- SmbException
MalformedURLException
public SmbRandomAccessFile(SmbFile file, String mode) throws SmbException
SmbFile
file
- mode
- SmbException
public void close() throws SmbException
SmbRandomAccess
close
インタフェース内 AutoCloseable
close
インタフェース内 SmbRandomAccess
SmbException
public int read() throws SmbException
SmbRandomAccess
read
インタフェース内 SmbRandomAccess
SmbException
public int read(byte[] b) throws SmbException
SmbRandomAccess
read
インタフェース内 SmbRandomAccess
b
- bufferSmbException
public int read(byte[] b, int off, int len) throws SmbException
SmbRandomAccess
read
インタフェース内 SmbRandomAccess
b
- bufferoff
- offset into bufferlen
- read up to len bytesSmbException
public final void readFully(byte[] b) throws SmbException
readFully
インタフェース内 DataInput
SmbException
public final void readFully(byte[] b, int off, int len) throws SmbException
readFully
インタフェース内 DataInput
SmbException
public int skipBytes(int n) throws SmbException
skipBytes
インタフェース内 DataInput
SmbException
public void write(int b) throws SmbException
write
インタフェース内 DataOutput
SmbException
public void write(byte[] b) throws SmbException
write
インタフェース内 DataOutput
SmbException
public void write(byte[] b, int off, int len) throws SmbException
write
インタフェース内 DataOutput
SmbException
public long getFilePointer()
SmbRandomAccess
getFilePointer
インタフェース内 SmbRandomAccess
public void seek(long pos)
SmbRandomAccess
seek
インタフェース内 SmbRandomAccess
public long length() throws SmbException
SmbRandomAccess
length
インタフェース内 SmbRandomAccess
SmbException
public void setLength(long newLength) throws SmbException
SmbRandomAccess
setLength
インタフェース内 SmbRandomAccess
newLength
- new file lengthSmbException
public final boolean readBoolean() throws SmbException
readBoolean
インタフェース内 DataInput
SmbException
public final byte readByte() throws SmbException
readByte
インタフェース内 DataInput
SmbException
public final int readUnsignedByte() throws SmbException
readUnsignedByte
インタフェース内 DataInput
SmbException
public final short readShort() throws SmbException
readShort
インタフェース内 DataInput
SmbException
public final int readUnsignedShort() throws SmbException
readUnsignedShort
インタフェース内 DataInput
SmbException
public final char readChar() throws SmbException
readChar
インタフェース内 DataInput
SmbException
public final int readInt() throws SmbException
readInt
インタフェース内 DataInput
SmbException
public final long readLong() throws SmbException
readLong
インタフェース内 DataInput
SmbException
public final float readFloat() throws SmbException
readFloat
インタフェース内 DataInput
SmbException
public final double readDouble() throws SmbException
readDouble
インタフェース内 DataInput
SmbException
public final String readLine() throws SmbException
readLine
インタフェース内 DataInput
SmbException
public final String readUTF() throws SmbException
readUTF
インタフェース内 DataInput
SmbException
public final void writeBoolean(boolean v) throws SmbException
writeBoolean
インタフェース内 DataOutput
SmbException
public final void writeByte(int v) throws SmbException
writeByte
インタフェース内 DataOutput
SmbException
public final void writeShort(int v) throws SmbException
writeShort
インタフェース内 DataOutput
SmbException
public final void writeChar(int v) throws SmbException
writeChar
インタフェース内 DataOutput
SmbException
public final void writeInt(int v) throws SmbException
writeInt
インタフェース内 DataOutput
SmbException
public final void writeLong(long v) throws SmbException
writeLong
インタフェース内 DataOutput
SmbException
public final void writeFloat(float v) throws SmbException
writeFloat
インタフェース内 DataOutput
SmbException
public final void writeDouble(double v) throws SmbException
writeDouble
インタフェース内 DataOutput
SmbException
public final void writeBytes(String s) throws SmbException
writeBytes
インタフェース内 DataOutput
SmbException
public final void writeChars(String s) throws SmbException
writeChars
インタフェース内 DataOutput
SmbException
public final void writeUTF(String str) throws SmbException
writeUTF
インタフェース内 DataOutput
SmbException
Copyright © 2018. All rights reserved.