/** * Reads a block of data identified by the given id. Subclasses may * overwrite this method to support additional block types. * * @param blocktype * block type * @return <code>true</code> if there are more blocks to read * @throws IOException * might be thrown by the underlying input stream */ protected boolean readBlock(final byte blocktype) throws IOException { switch (blocktype) { case ExecutionDataWriter.BLOCK_HEADER: readHeader(); return true; case ExecutionDataWriter.BLOCK_SESSIONINFO: readSessionInfo(); return true; case ExecutionDataWriter.BLOCK_EXECUTIONDATA: readExecutionData(); return true; default: throw new IOException(format("Unknown block type %x.", Byte.valueOf(blocktype))); } }