* @param in the channel wrapper to read input from
* @return information describing the RPM file
* @throws IOException if an error occurs reading the file
*/
public Format run( ReadableChannelWrapper in) throws IOException {
Format format = new Format();
Key< Integer> headerStartKey = in.start();
Key< Integer> lead = in.start();
format.getLead().read( in);
log( "Lead ended at '" + in.finish( lead) + "'.");
Key< Integer> signature = in.start();
int count = format.getSignature().read( in);
int expected = ByteBuffer.wrap(( byte[]) format.getSignature().getEntry( SIGNATURES).getValues(), 8, 4).getInt() / -16;
log( "Signature ended at '" + in.finish( signature) + "' and contained '" + count + "' headers (expected '" + expected + "').");
Integer headerStartPos = in.finish(headerStartKey);
format.getHeader().setStartPos(headerStartPos);
Key< Integer> headerKey = in.start();
count = format.getHeader().read( in);
expected = ByteBuffer.wrap(( byte[]) format.getHeader().getEntry( HEADERIMMUTABLE).getValues(), 8, 4).getInt() / -16;
Integer headerLength = in.finish(headerKey);
format.getHeader().setEndPos(headerStartPos + headerLength);
log( "Header ended at '" + headerLength + " and contained '" + count + "' headers (expected '" + expected + "').");
return format;
}