jcifs.smb
Class SmbFileInputStream

java.lang.Object
  |
  +--java.io.InputStream
        |
        +--jcifs.smb.SmbFileInputStream

public class SmbFileInputStream
extends InputStream

This InputStream can read bytes from a file on an SMB file server.


Constructor Summary
SmbFileInputStream(SmbFile file)
          Creates an InputStream for reading bytes from a file on an SMB server represented by the SmbFile parameter.
SmbFileInputStream(String url)
          Creates an InputStream for reading bytes from a file on an SMB server addressed by the URL parameter.
 
Method Summary
 void close()
          Closes this file 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.
 
Methods inherited from class java.io.InputStream
available, mark, markSupported, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmbFileInputStream

public SmbFileInputStream(String url)
                   throws IOException
Creates an 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.

SmbFileInputStream

public SmbFileInputStream(SmbFile file)
                   throws IOException
Creates an InputStream for reading bytes from a file on an SMB server represented by the SmbFile parameter.
Method Detail

close

public void close()
           throws IOException
Closes this file input stream and releases any system resources associated with the stream.
Overrides:
close in class InputStream

read

public int read()
         throws IOException
Reads a byte of data from this input stream.
Overrides:
read in class InputStream

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.
Overrides:
read in class InputStream

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.
Overrides:
read in class InputStream