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[]
buf
private int
bufferSize
private int
curr
private File
file
private boolean
isClosed
private static org.slf4j.Logger
logger
private java.util.concurrent.Future<SMB2ReadResponse>
nextResponse
private long
offset
private ProgressListener
progressListener
private long
readTimeout
-
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 int
available()
void
close()
private void
loadBuffer()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
private java.util.concurrent.Future<SMB2ReadResponse>
sendRequest()
long
skip(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:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.io.InputStream
- Throws:
java.io.IOException
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.InputStream
-
available
public int available()
- Overrides:
available
in classjava.io.InputStream
-
skip
public long skip(long n)
- Overrides:
skip
in classjava.io.InputStream
-
loadBuffer
private void loadBuffer() throws java.io.IOException
- Throws:
java.io.IOException
-
sendRequest
private java.util.concurrent.Future<SMB2ReadResponse> sendRequest()
-
-