Package io
Class BlockCopy
- java.lang.Object
-
- io.BlockCopy
-
public class BlockCopy extends java.lang.ObjectStream block copy example.- Author:
- Georgiy Korneev
-
-
Constructor Summary
Constructors Constructor Description BlockCopy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcopy(java.io.InputStream is, java.io.OutputStream os)Performs a block copy of the input stream to the output stream.static voidmain(java.lang.String[] args)Copies a file specified by the first argument to the file specified by the second argument.
-
-
-
Method Detail
-
copy
public static void copy(java.io.InputStream is, java.io.OutputStream os) throws java.io.IOExceptionPerforms a block copy of the input stream to the output stream.- Parameters:
is- input stream to copy.os- output stream to copy to.- Throws:
java.io.IOException- if an I/O error occurred.
-
main
public static void main(java.lang.String[] args)
Copies a file specified by the first argument to the file specified by the second argument.- Parameters:
args- command line arguments.
-
-