Package org.redline_rpm.payload

Examples of org.redline_rpm.payload.CpioHeader


        total += compressor.write( ByteBuffer.wrap( String.valueOf( target).getBytes()));
        total += header.skip( compressor, target.length());
      }
    }
   
    final CpioHeader trailer = new CpioHeader();
    trailer.setLast();
    total = trailer.write( compressor, total);
    trailer.skip( compressor, total);

    int length = compressor.finish( payloadkey);
    int pad = Util.difference( length, 3);
    Util.empty( compressor, ByteBuffer.allocate( pad));
    length += pad;
View Full Code Here


    scanner.log( format.toString());
      Header rpmHeader = format.getHeader();
      scanner.log("Payload compression: "+rpmHeader.getEntry(HeaderTag.PAYLOADCOMPRESSOR));
    InputStream uncompressed = Util.openPayloadStream(rpmHeader, fios);
    in = new ReadableChannelWrapper( Channels.newChannel( uncompressed));
    CpioHeader header;
    int total = 0;
    do {
      header = new CpioHeader();
      total = header.read( in, total);
            scanner.log(header.toString());
      final int skip = header.getFileSize();
      if ( uncompressed.skip( skip) != skip) throw new RuntimeException( "Skip failed.");
      total += header.getFileSize();
    } while ( !header.isLast());
  }
View Full Code Here

TOP

Related Classes of org.redline_rpm.payload.CpioHeader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.