Package org.openstreetmap.osmosis.osmbinary.Fileformat

Examples of org.openstreetmap.osmosis.osmbinary.Fileformat.Blob


    this.listener = listener;
  }


  private byte[] readBlobContent() throws IOException {
    Blob blob = Blob.parseFrom(rawBlob);
    byte[] blobData;

    if (blob.hasRaw()) {
      blobData = blob.getRaw().toByteArray();
    } else if (blob.hasZlibData()) {
      Inflater inflater = new Inflater();
      inflater.setInput(blob.getZlibData().toByteArray());
      blobData = new byte[blob.getRawSize()];
      try {
        inflater.inflate(blobData);
      } catch (DataFormatException e) {
        throw new OsmosisRuntimeException("Unable to decompress PBF blob.", e);
      }
View Full Code Here

TOP

Related Classes of org.openstreetmap.osmosis.osmbinary.Fileformat.Blob

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.