Class BlobInputStream
- java.lang.Object
-
- java.io.InputStream
-
- com.azure.storage.common.StorageInputStream
-
- com.azure.storage.blob.specialized.BlobInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class BlobInputStream extends StorageInputStream
Provides an input stream to read a given blob resource.
-
-
Field Summary
-
Fields inherited from class com.azure.storage.common.StorageInputStream
bufferSize, bufferStartOffset, lastError, streamFaulted
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ByteBuffer
dispatchRead(int readLength, long offset)
Dispatches a read operation of N bytes.BlobProperties
getProperties()
Gets the blob properties as fetched upon download.-
Methods inherited from class com.azure.storage.common.StorageInputStream
available, close, mark, markSupported, read, read, read, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Method Detail
-
dispatchRead
protected ByteBuffer dispatchRead(int readLength, long offset) throws IOException
Dispatches a read operation of N bytes. When using sparse page blobs, the page ranges are evaluated and zero bytes may be generated on the client side for some ranges that do not exist.- Specified by:
dispatchRead
in classStorageInputStream
- Parameters:
readLength
- Anint
which represents the number of bytes to read.- Throws:
IOException
- If an I/O error occurs.
-
getProperties
public BlobProperties getProperties()
Gets the blob properties as fetched upon download.- Returns:
BlobProperties
-
-