Class Blob


  • public final class Blob
    extends java.lang.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
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Blob.CompressionType
      The compression types for the blob
    • Constructor Summary

      Constructors 
      Constructor Description
      Blob​(java.lang.Integer rawSize, Blob.CompressionType compressionType, byte... bytes)
      Create a new blob
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] bytes()
      The bytes that make up the blob data
      Blob.CompressionType compressionType()
      The compression type of the blob
      java.io.InputStream inputStream()
      Get the decompressed inputstream for this blob
      java.lang.Integer rawSize()
      The raw size of the blob (after decompression)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Blob

        public Blob​(@Nullable
                    java.lang.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 Detail

      • rawSize

        @Nullable
        public java.lang.Integer rawSize()
        The raw size of the blob (after decompression)
        Returns:
        The raw size
      • bytes

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

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