Class BlobInputStream
java.lang.Object
java.io.InputStream
com.azure.storage.common.StorageInputStream
com.azure.storage.blob.specialized.BlobInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
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
Modifier and TypeMethodDescriptionprotected ByteBuffer
dispatchRead
(int readLength, long offset) Dispatches a read operation of N bytes.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, skipNBytes, transferTo
-
Method Details
-
dispatchRead
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
Gets the blob properties as fetched upon download.- Returns:
BlobProperties
-