protected InputStream getStream(String blobId) throws IOException { try { InputStream in = getDataRecord(blobId).getStream(); if (!(in instanceof BufferedInputStream)){ in = new BufferedInputStream(in); } return StatsCollectingStreams.wrap(stats, blobId, in); } catch (DataStoreException e) { throw new IOException(e); } }
protected InputStream getStream(String blobId) throws IOException { try { InputStream in = getDataRecord(blobId).getStream(); if (!(in instanceof BufferedInputStream)){ in = new BufferedInputStream(in); } return StatsCollectingStreams.wrap(stats, blobId, in); } catch (DataStoreException e) { throw new IOException(e); } }
protected InputStream getStream(String blobId) throws IOException { try { InputStream in = getDataRecord(blobId).getStream(); if (!(in instanceof BufferedInputStream)){ in = new BufferedInputStream(in); } return StatsCollectingStreams.wrap(stats, blobId, in); } catch (DataStoreException e) { throw new IOException(e); } }
@Override public long getBlobLength(String encodedBlobId) throws IOException { try { checkNotNull(encodedBlobId, "BlobId must be specified"); BlobId id = BlobId.of(encodedBlobId); if (encodeLengthInId && id.hasLengthInfo()) { return id.length; } return getDataRecord(id.blobId).getLength(); } catch (DataStoreException e) { throw new IOException(e); } }
@Override public long getBlobLength(String encodedBlobId) throws IOException { try { checkNotNull(encodedBlobId, "BlobId must be specified"); BlobId id = BlobId.of(encodedBlobId); if (encodeLengthInId && id.hasLengthInfo()) { return id.length; } return getDataRecord(id.blobId).getLength(); } catch (DataStoreException e) { throw new IOException(e); } }
@Override public long getBlobLength(String encodedBlobId) throws IOException { try { checkNotNull(encodedBlobId, "BlobId must be specified"); BlobId id = BlobId.of(encodedBlobId); if (encodeLengthInId && id.hasLengthInfo()) { return id.length; } return getDataRecord(id.blobId).getLength(); } catch (DataStoreException e) { throw new IOException(e); } }
@Override public DataRecord getRecordIfStored(DataIdentifier identifier) throws DataStoreException { if (isInMemoryRecord(identifier)) { return getDataRecord(identifier.toString()); } return delegate.getRecordIfStored(identifier); }
@Override public DataRecord getRecordIfStored(DataIdentifier identifier) throws DataStoreException { if (isInMemoryRecord(identifier)) { return getDataRecord(identifier.toString()); } return delegate.getRecordIfStored(identifier); }
@Override public DataRecord getRecord(DataIdentifier identifier) throws DataStoreException { if (isInMemoryRecord(identifier)) { return getDataRecord(identifier.toString()); } return delegate.getRecord(identifier); }
@Override public DataRecord getRecord(DataIdentifier identifier) throws DataStoreException { if (isInMemoryRecord(identifier)) { return getDataRecord(identifier.toString()); } return delegate.getRecord(identifier); }
@Override public DataRecord getRecordIfStored(DataIdentifier identifier) throws DataStoreException { if (isInMemoryRecord(identifier)) { return getDataRecord(identifier.toString()); } return delegate.getRecordIfStored(identifier); }
@Override public DataRecord getRecord(DataIdentifier identifier) throws DataStoreException { if (isInMemoryRecord(identifier)) { return getDataRecord(identifier.toString()); } return delegate.getRecord(identifier); }