public static void displayRawBlocksSummary(RawDataBlockList data_blocks) throws Exception { System.out.println("Raw Blocks Details:"); System.out.println(" Number of blocks: " + data_blocks.blockCount()); Method gbm = data_blocks.getClass().getSuperclass().getDeclaredMethod("get", int.class); gbm.setAccessible(true); for(int i=0; i<Math.min(16, data_blocks.blockCount()); i++) { ListManagedBlock block = (ListManagedBlock)gbm.invoke(data_blocks, Integer.valueOf(i)); byte[] data = new byte[Math.min(48, block.getData().length)]; System.arraycopy(block.getData(), 0, data, 0, data.length); System.out.println(" Block #" + i + ":"); System.out.println(HexDump.dump(data, 0, 0)); } System.out.println(""); }
blockList.fetchBlocks(root.getStartBlock(), -1); blockList.fetchBlocks(sbatStart, -1), list); return list;
setBlocks( blocks.toArray(new RawDataBlock[ blocks.size() ]) );
RawDataBlockList data_blocks = new RawDataBlockList(inp, bigBlockSize); displayRawBlocksSummary(data_blocks);
RawDataBlockList data_blocks = new RawDataBlockList(inp, bigBlockSize); displayRawBlocksSummary(data_blocks);
RawDataBlockList data_blocks = new RawDataBlockList(stream, header_block.getBigBlockSize());
blockList.fetchBlocks(root.getStartBlock(), -1); blockList.fetchBlocks(sbatStart, -1), list); return list;
public static void displayRawBlocksSummary(RawDataBlockList data_blocks) throws Exception { System.out.println("Raw Blocks Details:"); System.out.println(" Number of blocks: " + data_blocks.blockCount()); Method gbm = data_blocks.getClass().getSuperclass().getDeclaredMethod("get", int.class); gbm.setAccessible(true); for(int i=0; i<Math.min(16, data_blocks.blockCount()); i++) { ListManagedBlock block = (ListManagedBlock)gbm.invoke(data_blocks, Integer.valueOf(i)); byte[] data = new byte[Math.min(48, block.getData().length)]; System.arraycopy(block.getData(), 0, data, 0, data.length); System.out.println(" Block #" + i + ":"); System.out.println(HexDump.dump(data, 0, 0)); } System.out.println(""); }
setBlocks( blocks.toArray(new RawDataBlock[ blocks.size() ]) );
RawDataBlockList data_blocks = new RawDataBlockList(stream, header_block.getBigBlockSize());
/** * reading constructor (used when we've read in a file and we want * to extract the property table from it). Populates the * properties thoroughly * * @param headerBlock the header block of the file * @param blockList the list of blocks * * @exception IOException if anything goes wrong (which should be * a result of the input being NFG) */ public PropertyTable(final HeaderBlock headerBlock, final RawDataBlockList blockList) throws IOException { super( headerBlock, PropertyFactory.convertToProperties( blockList.fetchBlocks(headerBlock.getPropertyStart(), -1) ) ); _bigBigBlockSize = headerBlock.getBigBlockSize(); _blocks = null; }
data_blocks = new RawDataBlockList(stream, bigBlockSize); success = true; } finally {
/** * reading constructor (used when we've read in a file and we want * to extract the property table from it). Populates the * properties thoroughly * * @param headerBlock the header block of the file * @param blockList the list of blocks * * @exception IOException if anything goes wrong (which should be * a result of the input being NFG) */ public PropertyTable(final HeaderBlock headerBlock, final RawDataBlockList blockList) throws IOException { super( headerBlock, PropertyFactory.convertToProperties( blockList.fetchBlocks(headerBlock.getPropertyStart(), -1) ) ); _bigBigBlockSize = headerBlock.getBigBlockSize(); _blocks = null; }
data_blocks = new RawDataBlockList(stream, bigBlockSize); success = true; } finally {