public class SmbFileInputStream
extends java.io.InputStream
| Constructor and Description |
|---|
SmbFileInputStream(SmbFile file)
Creates an
InputStream for reading bytes from a file on
an SMB server represented by the SmbFile parameter. |
SmbFileInputStream(java.lang.String url)
Creates an
InputStream for reading bytes from a file on
an SMB server addressed by the url parameter. |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
This stream class is unbuffered.
|
void |
close()
Closes this input stream and releases any system resources associated with the stream.
|
int |
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) |
protected java.io.IOException |
seToIoe(SmbException se) |
long |
skip(long n)
Skip n bytes of data on this stream.
|
public SmbFileInputStream(java.lang.String url)
throws SmbException,
java.net.MalformedURLException,
java.net.UnknownHostException
InputStream for reading bytes from a file on
an SMB server addressed by the url parameter. See SmbFile for a detailed description and examples of the smb
URL syntax.url - An smb URL string representing the file to read fromSmbExceptionjava.net.MalformedURLExceptionjava.net.UnknownHostExceptionpublic SmbFileInputStream(SmbFile file) throws SmbException, java.net.MalformedURLException, java.net.UnknownHostException
InputStream for reading bytes from a file on
an SMB server represented by the SmbFile parameter. See
SmbFile for a detailed description and examples of
the smb URL syntax.file - An SmbFile specifying the file to read fromSmbExceptionjava.net.MalformedURLExceptionjava.net.UnknownHostExceptionprotected java.io.IOException seToIoe(SmbException se)
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOException - if a network error occurspublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException - if a network error occurspublic int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException - if a network error occurspublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOException - if a network error occurspublic int readDirect(byte[] b,
int off,
int len)
throws java.io.IOException
java.io.IOExceptionpublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOException