(InputStream stream, ByteArrayOutputStream2 output)
| 653 | } |
| 654 | |
| 655 | private void copy(InputStream stream, ByteArrayOutputStream2 output) throws IOException { |
| 656 | final byte[] buffer = new byte[1024 * 4]; |
| 657 | int n = 0; |
| 658 | while (-1 != (n = stream.read(buffer))) { |
| 659 | output.write(buffer, 0, n); |
| 660 | } |
| 661 | } |
| 662 | |
| 663 | /** |
| 664 | * Workaround taken from bug <a |