Following code is used to read blob chunk by chunk: ``` java try (ReadChannel reader = blob.reader()) { WritableByteChannel channel = Channels.newChannel(outputStream); ByteBuffer bytes = ByteBuffer.allocate(64 * 1024); while (reader.read(bytes) > 0) { bytes.flip(); channel.write(bytes); bytes.clear(); } } ``` reader.read() will throw exception: com.google.gcloud.storage.StorageException: java.lang.NullPointerException ``` at com.google.gcloud.storage.StorageException.translateAndThrow(StorageException.java:74) at com.google.gcloud.storage.BlobReadChannel.read(BlobReadChannel.java:159) ``` The root cause is, reader is blindly reading chunks from cloud storage, if it reaches beyond the end of the blob, then cloud storage will throw an error: 416 Requested range not satisfiable.