Package org.redline_rpm

Examples of org.redline_rpm.ReadableChannelWrapper.finish()


      String value = "";
      if ( object instanceof File) {
        final ReadableChannelWrapper input = new ReadableChannelWrapper( new FileInputStream(( File) object).getChannel());
        final Key< byte[]> key = input.start( "MD5");
        while ( input.read( buffer) != -1) buffer.rewind();
        value = Util.hex(input.finish(key));
        input.close();
      } else if ( object instanceof URL) {
        final ReadableChannelWrapper input = new ReadableChannelWrapper( Channels.newChannel((( URL) object).openConnection().getInputStream()));
        final Key< byte[]> key = input.start( "MD5");
        while ( input.read( buffer) != -1) buffer.rewind();
View Full Code Here


        input.close();
      } else if ( object instanceof URL) {
        final ReadableChannelWrapper input = new ReadableChannelWrapper( Channels.newChannel((( URL) object).openConnection().getInputStream()));
        final Key< byte[]> key = input.start( "MD5");
        while ( input.read( buffer) != -1) buffer.rewind();
        value = Util.hex(input.finish(key));
        input.close();
      }
      array[ x++] = value;
    }
    return array;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.