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, reset
public SmbFileInputStream(String url, CIFSContext tc) throws SmbException, MalformedURLException
url
- tc
- context to useSmbException
MalformedURLException
public 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 fromSmbException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
- if a network error occurspublic int read() throws IOException
read
in class InputStream
IOException
- if a network error occurspublic int read(byte[] b) throws IOException
read
in class InputStream
IOException
- if a network error occurspublic int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
- 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 InputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
Copyright © 2017. All rights reserved.