/** * Create a new file header block with the given uncompressed content. * The block will have RAW (no) compression and FILE_HEADER content type. * * @param rawContent the uncompressed content of the block * @return a new {@link Block} object */ public static Block createRawFileHeaderBlock(final byte[] rawContent) { return new Block(BlockContentType.FILE_HEADER, rawContent); }
/** * Create a new core data block with the given uncompressed content. * The block will have RAW (no) compression and CORE content type. * * @param rawContent the uncompressed content of the block * @return a new {@link Block} object */ public static Block createRawCoreDataBlock(final byte[] rawContent) { return new Block(BlockContentType.CORE, rawContent); }
/** * Create a new core data block with the given uncompressed content. * The block will have RAW (no) compression and CORE content type. * * @param rawContent the uncompressed content of the block * @return a new {@link Block} object */ public static Block createRawCoreDataBlock(final byte[] rawContent) { return new Block(BlockContentType.CORE, rawContent); }
/** * Create a new slice header block with the given uncompressed content. * The block will have RAW (no) compression and MAPPED_SLICE content type. * * @param rawContent the uncompressed content of the block * @return a new {@link Block} object */ public static Block createRawSliceHeaderBlock(final byte[] rawContent) { return new Block(BlockContentType.MAPPED_SLICE, rawContent); }
/** * Create a new slice header block with the given uncompressed content. * The block will have RAW (no) compression and MAPPED_SLICE content type. * * @param rawContent the uncompressed content of the block * @return a new {@link Block} object */ public static Block createRawSliceHeaderBlock(final byte[] rawContent) { return new Block(BlockContentType.MAPPED_SLICE, rawContent); }
/** * Create a new file header block with the given uncompressed content. * The block will have RAW (no) compression and FILE_HEADER content type. * * @param rawContent the uncompressed content of the block * @return a new {@link Block} object */ public static Block createRawFileHeaderBlock(final byte[] rawContent) { return new Block(BlockContentType.FILE_HEADER, rawContent); }
/** * Create a new compression header block with the given uncompressed content. * The block will have RAW (no) compression and COMPRESSION_HEADER content type. * * @param rawContent the uncompressed content of the block * @return a new {@link Block} object */ public static Block createRawCompressionHeaderBlock(final byte[] rawContent) { return new Block(BlockContentType.COMPRESSION_HEADER, rawContent); }
/** * Create a new compression header block with the given uncompressed content. * The block will have RAW (no) compression and COMPRESSION_HEADER content type. * * @param rawContent the uncompressed content of the block * @return a new {@link Block} object */ public static Block createRawCompressionHeaderBlock(final byte[] rawContent) { return new Block(BlockContentType.COMPRESSION_HEADER, rawContent); }
return new ExternalBlock(compressionMethod, contentId, compressedContent, uncompressedSize); } else { return new Block(compressionMethod, contentType, compressedContent, uncompressedSize);
return new ExternalBlock(compressionMethod, contentId, compressedContent, uncompressedSize); } else { return new Block(compressionMethod, contentType, compressedContent, uncompressedSize);