パッケージ jcifs.smb
クラス SmbFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- jcifs.smb.SmbFileInputStream
-
- すべての実装されたインタフェース:
Closeable
,AutoCloseable
- 直系の既知のサブクラス:
SmbPipeInputStream
public class SmbFileInputStream extends InputStream
This InputStream can read bytes from a file on an SMB file server. Offsets are 64 bits.
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 SmbFileInputStream(String url, CIFSContext tc)
SmbFileInputStream(SmbFile file)
Creates anInputStream
for reading bytes from a file on an SMB server represented by theSmbFile
parameter.
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 int
available()
This stream class is unbuffered.void
close()
Closes this input stream and releases any system resources associated with the stream.void
open()
Ensures that the file descriptor is openendint
read()
Reads a byte of data from this input stream.int
read(byte[] b)
Reads up to b.length bytes of data from this input stream into an array of bytes.int
read(byte[] b, int off, int len)
Reads up to len bytes of data from this input stream into an array of bytes.int
readDirect(byte[] b, int off, int len)
Reads up to len bytes of data from this input stream into an array of bytes.protected static IOException
seToIoe(SmbException se)
long
skip(long n)
Skip n bytes of data on this stream.-
クラスから継承されたメソッド java.io.InputStream
mark, markSupported, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
-
-
-
コンストラクタの詳細
-
SmbFileInputStream
public SmbFileInputStream(String url, CIFSContext tc) throws SmbException, MalformedURLException
- パラメータ:
url
-tc
- context to use- 例外:
SmbException
MalformedURLException
-
SmbFileInputStream
public SmbFileInputStream(SmbFile file) throws SmbException
Creates anInputStream
for reading bytes from a file on an SMB server represented by theSmbFile
parameter. SeeSmbFile
for a detailed description and examples of the smb URL syntax.- パラメータ:
file
- AnSmbFile
specifying the file to read from- 例外:
SmbException
-
-
メソッドの詳細
-
open
public void open() throws CIFSException
Ensures that the file descriptor is openend- 例外:
CIFSException
-
seToIoe
protected static IOException seToIoe(SmbException se)
-
close
public void close() throws IOException
Closes this input stream and releases any system resources associated with the stream.- 定義:
close
インタフェース内AutoCloseable
- 定義:
close
インタフェース内Closeable
- オーバーライド:
close
クラス内InputStream
- 例外:
IOException
- if a network error occurs
-
read
public int read() throws IOException
Reads a byte of data from this input stream.- 定義:
read
クラス内InputStream
- 例外:
IOException
- if a network error occurs
-
read
public int read(byte[] b) throws IOException
Reads up to b.length bytes of data from this input stream into an array of bytes.- オーバーライド:
read
クラス内InputStream
- 例外:
IOException
- if a network error occurs
-
read
public int read(byte[] b, int off, int len) throws IOException
Reads up to len bytes of data from this input stream into an array of bytes.- オーバーライド:
read
クラス内InputStream
- 例外:
IOException
- if a network error occurs
-
readDirect
public int readDirect(byte[] b, int off, int len) throws IOException
Reads up to len bytes of data from this input stream into an array of bytes.- パラメータ:
b
-off
-len
-- 戻り値:
- number of bytes read
- 例外:
IOException
- if a network error occurs
-
available
public int available() throws IOException
This stream class is unbuffered. Therefore this method will always return 0 for streams connected to regular files. However, a stream created from a Named Pipe this method will query the server using a "peek named pipe" operation and return the number of available bytes on the server.- オーバーライド:
available
クラス内InputStream
- 例外:
IOException
-
skip
public long skip(long n) throws IOException
Skip n bytes of data on this stream. This operation will not result in any IO with the server. Unlink InputStream value less than the one provided will not be returned if it exceeds the end of the file (if this is a problem let us know).- オーバーライド:
skip
クラス内InputStream
- 例外:
IOException
-
-