docs: private byte[] copyOf(byte[] original, int length) {
          byte[] copy = new byte[length];
          if (length <= original.length) {
              System.arraycopy(original, 0, copy, 0, length);
          }
          else {
              System.arraycopy(original, 0, copy, 0, original.length);
          }
          return copy;
      }