public byte [ ] readBlob ( String key ) throws IOException , KeyNotFoundException { ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; readBlobTo ( key , out ) ; byte [ ] bytes = out . toByteArray ( ) ; out . close ( ) ; return bytes ; }
Wrapper around readBlobTo which returns a ByteArray output stream .