java.lang.Object
org.openstreetmap.josm.data.osm.pbf.Blob

public final class Blob extends Object
A "Blob" of data from an OSM PBF file. It, in turn, contains additional data in PBF format, which may be compressed.
Since:
18695
  • Field Details

  • Constructor Details

    • Blob

      public Blob(@Nullable Integer rawSize, @Nonnull Blob.CompressionType compressionType, @Nonnull byte... bytes)
      Create a new blob
      Parameters:
      rawSize - The blob size
      compressionType - The compression type
      bytes - The bytes of the blob
  • Method Details

    • rawSize

      @Nullable public Integer rawSize()
      The raw size of the blob (after decompression)
      Returns:
      The raw size
    • compressionType

      The compression type of the blob
      Returns:
      The compression type
    • bytes

      @Nonnull public byte[] bytes()
      The bytes that make up the blob data
      Returns:
      The bytes
    • inputStream

      @Nonnull public InputStream inputStream() throws IOException
      Get the decompressed inputstream for this blob
      Returns:
      The decompressed inputstream
      Throws:
      IOException - if we don't support the compression type or the decompressor has issues, see
      • BZip2CompressorInputStream