|  | @@ -77,6 +77,7 @@ public class AcmInputStream extends InputStream {
 | 
	
		
			
				|  |  |      System.arraycopy(slice, 0, buffer, offset, byteCount);
 | 
	
		
			
				|  |  |      if (DEBUG) {
 | 
	
		
			
				|  |  |        Log.i(TAG, "Actually read " + byteCount + " bytes.");
 | 
	
		
			
				|  |  | +      Log.i(TAG, "Slice: " + byteArrayToHexString(slice));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |      return byteCount;
 | 
	
		
			
				|  |  |    }
 | 
	
	
		
			
				|  | @@ -85,4 +86,19 @@ public class AcmInputStream extends InputStream {
 | 
	
		
			
				|  |  |    public int read() throws IOException {
 | 
	
		
			
				|  |  |      throw new UnsupportedOperationException();
 | 
	
		
			
				|  |  |    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  // TODO(damonkohler): Possibly move this to some common place?
 | 
	
		
			
				|  |  | +  private static String byteArrayToHexString(byte[] data) {
 | 
	
		
			
				|  |  | +    if (data == null) {
 | 
	
		
			
				|  |  | +      return "null";
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    if (data.length == 0) {
 | 
	
		
			
				|  |  | +      return "empty";
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    StringBuilder out = new StringBuilder(data.length * 5);
 | 
	
		
			
				|  |  | +    for (byte b : data) {
 | 
	
		
			
				|  |  | +      out.append(String.format("%02x", b));
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +    return out.toString();
 | 
	
		
			
				|  |  | +  }
 | 
	
		
			
				|  |  |  }
 |