public class SmbFileInputStream extends 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(String url,
CIFSContext tc) |
| 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)
Reads up to len bytes of data from this input stream into an array of bytes.
|
long |
skip(long n)
Skip n bytes of data on this stream.
|
mark, markSupported, resetpublic SmbFileInputStream(String url, CIFSContext tc) throws SmbException, MalformedURLException
url - tc - context to useSmbExceptionMalformedURLExceptionpublic SmbFileInputStream(SmbFile file) throws SmbException
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 fromSmbExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOException - if a network error occurspublic int read()
throws IOException
read in class InputStreamIOException - if a network error occurspublic int read(byte[] b)
throws IOException
read in class InputStreamIOException - if a network error occurspublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOException - if a network error occurspublic int readDirect(byte[] b,
int off,
int len)
throws IOException
b - off - len - IOException - if a network error occurspublic int available()
throws IOException
available in class InputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionCopyright © 2018. All rights reserved.