MCPcopy Create free account
hub / github.com/apache/pig / catInto

Method catInto

test/org/apache/pig/test/TestBZip.java:674–684  ·  view source on GitHub ↗
(String src, String dest)

Source from the content-addressed store, hash-verified

672 * Concatenate the contents of src file to the contents of dest file
673 */
674 private void catInto(String src, String dest) throws IOException {
675 FileOutputStream out = new FileOutputStream(new File(dest) , true);
676 FileInputStream in = new FileInputStream(new File(src));
677 byte[] buffer = new byte[4096];
678 int bytesread;
679 while ((bytesread = in.read(buffer)) != -1) {
680 out.write(buffer,0, bytesread);
681 }
682 in.close();
683 out.close();
684 }
685
686 // See PIG-1714
687 @Test

Callers 1

testBZ2ConcatenationMethod · 0.95

Calls 3

closeMethod · 0.65
readMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected