comparison src/com/tmate/hgkit/ll/Nodeid.java @ 13:df8c67f3006a

Basic manifest parsing to analyze what's in there
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Sun, 26 Dec 2010 03:21:17 +0100
parents d6d2a630f4a6
children 11cfabe692b3
comparison
equal deleted inserted replaced
12:181fccc176ef 13:df8c67f3006a
20 this.binaryData = binaryRepresentation; 20 this.binaryData = binaryRepresentation;
21 } 21 }
22 22
23 @Override 23 @Override
24 public String toString() { 24 public String toString() {
25 return new DigestHelper().toHexString(binaryData, 0, 20); 25 return new DigestHelper().toHexString(binaryData, 0, binaryData.length);
26 } 26 }
27 27
28 // binascii.unhexlify() 28 // binascii.unhexlify()
29 public static Nodeid fromAscii(byte[] asciiRepresentation, int offset, int length) { 29 public static Nodeid fromAscii(byte[] asciiRepresentation, int offset, int length) {
30 assert length % 2 == 0; // Python's binascii.hexlify convert each byte into 2 digits 30 assert length % 2 == 0; // Python's binascii.hexlify convert each byte into 2 digits