@Test public void testCopy() throws FileNotFoundException { final String dbPath = "./src/test/resources" + File.separator + BasicConstants.DB_NAME; final File dbFile = new File(dbPath); final File outFile = new File(AbstractTest.TEST_DIRECTORY + File.separator + "outFile.txt"); Assert.assertFalse(outFile.exists()); final InputStream input = new FileInputStream(dbFile); final OutputStream output = new FileOutputStream(outFile); try { IOHelper.copy(input, output); Assert.assertTrue(outFile.exists()); } catch (final IOException e) { Assert.fail(e.getMessage()); } }
public static int copy(final InputStream input, final OutputStream output) throws IOException { final long count = copyLarge(input, output); if (count > Integer.MAX_VALUE) { return -1; } return (int) count; }
IOHelper { public static int copy(final InputStream input, final OutputStream output) throws IOException { final long count = copyLarge(input, output); if (count > Integer.MAX_VALUE) { return -1; } return (int) count; } }
IOHelper { public static int copy(final InputStream input, final OutputStream output) throws IOException { final long count = copyLarge(input, output); if (count > Integer.MAX_VALUE) { return -1; } return (int) count; }  }
IOHelper { public static int copy(final InputStream input, final OutputStream output) throws IOException { final long count = copyLarge(input, output); if (count > Integer.MAX_VALUE) { return -1; } return (int) count; }  static void closeQuietly(final Closeable closeable); static int copy(final InputStream input, final OutputStream output); static long copyLarge(final InputStream input,
			final OutputStream output); static List readLines(final InputStream input); static List readLines(final Reader input); static void write(final String data, final OutputStream output,
			final Charset encoding); }
IOHelper { public static int copy(final InputStream input, final OutputStream output) throws IOException { final long count = copyLarge(input, output); if (count > Integer.MAX_VALUE) { return -1; } return (int) count; }  static void closeQuietly(final Closeable closeable); static int copy(final InputStream input, final OutputStream output); static long copyLarge(final InputStream input,
			final OutputStream output); static List readLines(final InputStream input); static List readLines(final Reader input); static void write(final String data, final OutputStream output,
			final Charset encoding);  }