package innovimax.mixthem.operation;

import innovimax.mixthem.io.DefaultCharReader;
import innovimax.mixthem.io.DefaultCharWriter;
import innovimax.mixthem.io.IInputChar;
import innovimax.mixthem.io.IOutputChar;
import innovimax.mixthem.io.InputResource;

import java.io.IOException;
import java.io.OutputStream;

/**
* <p>Copy all characters.</p>
* @author Innovimax
* @version 1.0
*/
public class DefaultCharCopy implements ICopy {

    private final static int CHAR_BUFFER_SIZE = 1024;
    
    public void processFile(InputResource input, OutputStream out) throws IOException {
        char[] buffer = new char[CHAR_BUFFER_SIZE];
        IInputChar reader = new DefaultCharReader(input);
        IOutputChar writer = new DefaultCharWriter(out);
        while (reader.hasCharacter()) {
            final int len = reader.nextCharacters(buffer, CHAR_BUFFER_SIZE);
            writer.writeCharacters(buffer, len);
        }
        reader.close();
        writer.close();
    }    
    
}

@@ -154,25 +154,25 @@
 hem.io.I
+Char
 Input
-Char
 ;%0Aimport
@@ -194,26 +194,26 @@
 hem.io.I
+Char
 Output
-Char
 ;%0Aimport
@@ -641,17 +641,17 @@
    I
+Char
 Input
-Char
  rea
@@ -699,18 +699,18 @@
    I
+Char
 Output
-Char
  wri

Update DefaultCharCopy.java