Package crosby.binary.file
Class FileBlock
- java.lang.Object
-
- crosby.binary.file.FileBlockBase
-
- crosby.binary.file.FileBlock
-
public class FileBlock extends FileBlockBase
A full fileblock object contains both the metadata and data of a fileblock
-
-
Field Summary
Fields Modifier and Type Field Description (package private) com.google.protobuf.ByteStringdataContains the contents of a block for use or further processing(package private) static intwarncountDon't be noisy unless the warning occurs somewhat often-
Fields inherited from class crosby.binary.file.FileBlockBase
indexdata, MAX_BODY_SIZE, MAX_HEADER_SIZE, type
-
-
Constructor Summary
Constructors Modifier Constructor Description privateFileBlock(java.lang.String type, com.google.protobuf.ByteString blob, com.google.protobuf.ByteString indexdata)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddeflateInto(Fileformat.Blob.Builder blobbuilder)com.google.protobuf.ByteStringgetData()static FileBlocknewInstance(java.lang.String type, com.google.protobuf.ByteString blob, com.google.protobuf.ByteString indexdata)(package private) static voidprocess(java.io.InputStream input, BlockReaderAdapter callback)Reads or skips a fileblock.FileBlockPositionwriteTo(java.io.OutputStream outwrite, CompressFlags flags)-
Methods inherited from class crosby.binary.file.FileBlockBase
getIndexData, getType
-
-
-
-
Method Detail
-
newInstance
public static FileBlock newInstance(java.lang.String type, com.google.protobuf.ByteString blob, com.google.protobuf.ByteString indexdata)
-
deflateInto
protected void deflateInto(Fileformat.Blob.Builder blobbuilder)
-
writeTo
public FileBlockPosition writeTo(java.io.OutputStream outwrite, CompressFlags flags) throws java.io.IOException
- Throws:
java.io.IOException
-
process
static void process(java.io.InputStream input, BlockReaderAdapter callback) throws java.io.IOExceptionReads or skips a fileblock.- Throws:
java.io.IOException
-
getData
public com.google.protobuf.ByteString getData()
-
-