パッケージ jcifs.smb1.smb1
クラス SmbFileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- jcifs.smb1.smb1.SmbFileInputStream
-
- すべての実装されたインタフェース:
Closeable,AutoCloseable
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)Creates anInputStreamfor reading bytes from a file on an SMB server addressed by theurlparameter.SmbFileInputStream(SmbFile file)Creates anInputStreamfor reading bytes from a file on an SMB server represented by theSmbFileparameter.
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 intavailable()This stream class is unbuffered.voidclose()Closes this input stream and releases any system resources associated with the stream.intread()Reads a byte of data from this input stream.intread(byte[] b)Reads up to b.length bytes of data from this input stream into an array of bytes.intread(byte[] b, int off, int len)Reads up to len bytes of data from this input stream into an array of bytes.intreadDirect(byte[] b, int off, int len)protected IOExceptionseToIoe(SmbException se)longskip(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) throws SmbException, MalformedURLException, UnknownHostException
Creates anInputStreamfor reading bytes from a file on an SMB server addressed by theurlparameter. SeeSmbFilefor a detailed description and examples of the smb URL syntax.- パラメータ:
url- An smb URL string representing the file to read from- 例外:
SmbExceptionMalformedURLExceptionUnknownHostException
-
SmbFileInputStream
public SmbFileInputStream(SmbFile file) throws SmbException, MalformedURLException, UnknownHostException
Creates anInputStreamfor reading bytes from a file on an SMB server represented by theSmbFileparameter. SeeSmbFilefor a detailed description and examples of the smb URL syntax.- パラメータ:
file- AnSmbFilespecifying the file to read from- 例外:
SmbExceptionMalformedURLExceptionUnknownHostException
-
-
メソッドの詳細
-
seToIoe
protected IOException seToIoe(SmbException se)
-
close
public void close() throws IOExceptionCloses 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 IOExceptionReads a byte of data from this input stream.- 定義:
readクラス内InputStream- 例外:
IOException- if a network error occurs
-
read
public int read(byte[] b) throws IOExceptionReads 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 IOExceptionReads 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- 例外:
IOException
-
available
public int available() throws IOExceptionThis 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 IOExceptionSkip 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
-
-