test_class.file: src/de/slackspace/openkeepass/util/StreamUtilsTest.java
test_class.identifier: StreamUtilsTest
test_case.body: @Test
      public void shouldReadThreeBytes() throws IOException {
          byte[] bytes = ByteUtils.hexStringToByteArray("af66b1");
          ByteArrayInputStream stream = new ByteArrayInputStream(bytes);
  
          byte[] buffer = new byte[3];
          int read = StreamUtils.read(stream, buffer);
  
          Assert.assertEquals(3, read);
          Assert.assertEquals(3, buffer.length);
          Assert.assertEquals("af66b1", ByteUtils.toHexString(buffer));
      }
test_case.class_method_signature: StreamUtilsTest.shouldReadThreeBytes()
test_case.full_signature: @Test public void shouldReadThreeBytes()
test_case.identifier: shouldReadThreeBytes
test_case.invocations: hexStringToByteArray read assertEquals assertEquals assertEquals toHexString
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldReadThreeBytes()
focal_class.declarator: BUFFER_SIZE = 4096
focal_class.modifier: private static final
focal_class.original_string: private static final int BUFFER_SIZE = 4096;
focal_class.type: int
focal_class.var_name: BUFFER_SIZE
focal_class.declarator: EOF = -1
focal_class.modifier: private static final
focal_class.original_string: private static final int EOF = -1;
focal_class.type: int
focal_class.var_name: EOF
focal_class.file: src/de/slackspace/openkeepass/util/StreamUtils.java
focal_class.identifier: StreamUtils
focal_class.class_method_signature: StreamUtils.StreamUtils()
focal_class.full_signature: private  StreamUtils()
focal_class.identifier: StreamUtils
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.signature:  StreamUtils()
focal_class.class_method_signature: StreamUtils.read(InputStream input, byte[] buffer)
focal_class.full_signature: public static int read(InputStream input, byte[] buffer)
focal_class.identifier: read
focal_class.modifiers: public static
focal_class.parameters: (InputStream input, byte[] buffer)
focal_class.return: int
focal_class.signature: int read(InputStream input, byte[] buffer)
focal_class.class_method_signature: StreamUtils.toByteArray(InputStream input)
focal_class.full_signature: public static byte[] toByteArray(InputStream input)
focal_class.identifier: toByteArray
focal_class.modifiers: public static
focal_class.parameters: (InputStream input)
focal_class.return: byte[]
focal_class.signature: byte[] toByteArray(InputStream input)
focal_class.class_method_signature: StreamUtils.copyLarge(InputStream input, OutputStream output, byte[] buffer)
focal_class.full_signature: private static long copyLarge(InputStream input, OutputStream output, byte[] buffer)
focal_class.identifier: copyLarge
focal_class.modifiers: private static
focal_class.parameters: (InputStream input, OutputStream output, byte[] buffer)
focal_class.return: long
focal_class.signature: long copyLarge(InputStream input, OutputStream output, byte[] buffer)
focal_method.body: public static int read(InputStream input, byte[] buffer) throws IOException {
          if(input == null || buffer == null) {
              return -1;
          }
  
          int remaining = buffer.length;
          while (remaining > 0) {
              int location = buffer.length - remaining;
              int count = input.read(buffer, 0 + location, remaining);
              if (EOF == count) { // EOF
                  break;
              }
              remaining -= count;
          }
          return buffer.length - remaining;
      }
focal_method.class_method_signature: StreamUtils.read(InputStream input, byte[] buffer)
focal_method.full_signature: public static int read(InputStream input, byte[] buffer)
focal_method.identifier: read
focal_method.invocations: read
focal_method.modifiers: public static
focal_method.parameters: (InputStream input, byte[] buffer)
focal_method.return: int
focal_method.signature: int read(InputStream input, byte[] buffer)