Class FileBlockBase

  • Direct Known Subclasses:
    FileBlock, FileBlockPosition

    public class FileBlockBase
    extends java.lang.Object
    Base class that contains the metadata about a fileblock. Subclasses of this include additional fields, such as byte offsets that let a fileblock be read in a random-access fashion, or the data itself.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.google.protobuf.ByteString indexdata
      Block metadata, stored in the index block and as a prefix for every block.
      (package private) static int MAX_BODY_SIZE
      If a block's size is bigger than this, fail.
      (package private) static int MAX_HEADER_SIZE
      If a block header is bigger than this, fail.
      protected java.lang.String type
      Identifies the type of the data within a block
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected FileBlockBase​(java.lang.String type, com.google.protobuf.ByteString indexdata)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.google.protobuf.ByteString getIndexData()  
      java.lang.String getType()  
      • Methods inherited from class java.lang.Object

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

      • MAX_HEADER_SIZE

        static final int MAX_HEADER_SIZE
        If a block header is bigger than this, fail. We use excessively large header size as an indication of corrupt files
        See Also:
        Constant Field Values
      • MAX_BODY_SIZE

        static final int MAX_BODY_SIZE
        If a block's size is bigger than this, fail. We use excessively large block sizes as an indication of corrupt files
        See Also:
        Constant Field Values
      • type

        protected final java.lang.String type
        Identifies the type of the data within a block
      • indexdata

        protected final com.google.protobuf.ByteString indexdata
        Block metadata, stored in the index block and as a prefix for every block.
    • Constructor Detail

      • FileBlockBase

        protected FileBlockBase​(java.lang.String type,
                                com.google.protobuf.ByteString indexdata)
    • Method Detail

      • getType

        public java.lang.String getType()
      • getIndexData

        public com.google.protobuf.ByteString getIndexData()