Search in sources :

Example 6 with LZFInputStream

use of com.ning.compress.lzf.LZFInputStream in project GeoGig by boundlessgeo.

the class MongoObjectDatabase method fromBytes.

private RevObject fromBytes(ObjectId id, byte[] buffer) {
    ByteArrayInputStream byteStream = new ByteArrayInputStream(buffer);
    RevObject result;
    try {
        result = serializers.createObjectReader().read(id, new LZFInputStream(byteStream));
    } catch (Exception e) {
        throw Throwables.propagate(e);
    }
    return result;
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) RevObject(org.locationtech.geogig.api.RevObject) LZFInputStream(com.ning.compress.lzf.LZFInputStream) NoSuchElementException(java.util.NoSuchElementException) IOException(java.io.IOException) RepositoryConnectionException(org.locationtech.geogig.repository.RepositoryConnectionException)

Aggregations

LZFInputStream (com.ning.compress.lzf.LZFInputStream)6 ByteArrayInputStream (java.io.ByteArrayInputStream)3 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 RevObject (org.locationtech.geogig.api.RevObject)2 AbstractIterator (com.google.common.collect.AbstractIterator)1 Iterator (java.util.Iterator)1 NoSuchElementException (java.util.NoSuchElementException)1 OutputStreamBuilder (org.apache.camel.converter.stream.OutputStreamBuilder)1 SSTableMultiWriter (org.apache.cassandra.io.sstable.SSTableMultiWriter)1 TrackedInputStream (org.apache.cassandra.io.util.TrackedInputStream)1 Test (org.junit.Test)1 ObjectId (org.locationtech.geogig.api.ObjectId)1 RepositoryConnectionException (org.locationtech.geogig.repository.RepositoryConnectionException)1