Package com.hierynomus.smbj.share
Class FileInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.hierynomus.smbj.share.FileInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
class FileInputStream extends java.io.InputStream
-
-
Field Summary
Fields Modifier and Type Field Description private byte[]bufprivate intbufferSizeprivate intcurrprivate Filefileprivate booleanisClosedprivate static org.slf4j.Loggerloggerprivate java.util.concurrent.Future<SMB2ReadResponse>nextResponseprivate longoffsetprivate ProgressListenerprogressListenerprivate longreadTimeout
-
Constructor Summary
Constructors Constructor Description FileInputStream(File file, int bufferSize, long readTimeout, ProgressListener progressListener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()private voidloadBuffer()intread()intread(byte[] b)intread(byte[] b, int off, int len)private java.util.concurrent.Future<SMB2ReadResponse>sendRequest()longskip(long n)
-
-
-
Field Detail
-
readTimeout
private final long readTimeout
-
file
private File file
-
offset
private long offset
-
curr
private int curr
-
buf
private byte[] buf
-
progressListener
private ProgressListener progressListener
-
isClosed
private boolean isClosed
-
nextResponse
private java.util.concurrent.Future<SMB2ReadResponse> nextResponse
-
logger
private static final org.slf4j.Logger logger
-
bufferSize
private int bufferSize
-
-
Constructor Detail
-
FileInputStream
FileInputStream(File file, int bufferSize, long readTimeout, ProgressListener progressListener)
-
-
Method Detail
-
read
public int read() throws java.io.IOException- Specified by:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classjava.io.InputStream- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream
-
available
public int available()
- Overrides:
availablein classjava.io.InputStream
-
skip
public long skip(long n)
- Overrides:
skipin classjava.io.InputStream
-
loadBuffer
private void loadBuffer() throws java.io.IOException- Throws:
java.io.IOException
-
sendRequest
private java.util.concurrent.Future<SMB2ReadResponse> sendRequest()
-
-