// Path: segment/src/main/java/net/loomchild/segment/util/Util.java
// public static void copyAll(Reader reader, Writer writer) {
// 	try {
// 		char[] readBuffer = new char[READ_BUFFER_SIZE];
// 		int count;
// 		while ((count = reader.read(readBuffer)) != -1) {
// 			writer.write(readBuffer, 0, count);
// 		}
// 	} catch (IOException e) {
// 		throw new IORuntimeException(e);
// 	}
// }
// 
// Path: segment/src/main/java/net/loomchild/segment/srx/SrxTransformer.java
// public interface SrxTransformer {
// 
// 	/**
// 	 * Transform given SRX document to newest supported version and write it to
// 	 * given writer.
// 	 * 
// 	 * @param reader reader containing SRX document
// 	 * @param writer writer to write transformed SRX document
// 	 * @param parameterMap map containing transformation parameters
// 	 */
// 	public void transform(Reader reader, Writer writer,
// 			Map<String, Object> parameterMap);
// 
// 	/**
// 	 * Transform given SRX document and return Reader containing newest
// 	 * supported version.
// 	 * 
// 	 * @param reader reader containing SRX document
// 	 * @param parameterMap map containing transformation parameters
// 	 * @return reader containing SRX document in newest supported version
// 	 */
// 	public Reader transform(Reader reader, Map<String, Object> parameterMap);
// 
// }


import static net.loomchild.segment.util.Util.copyAll;
import java.io.Reader;
import java.io.Writer;
import java.util.Map;
import net.loomchild.segment.srx.SrxTransformer;
package net.loomchild.segment.srx.io;





/**
 * Represents SRX document transformer between SRX 2.0 and newest supported
 * version. As newest supported version is 2.0 so does no transformation.
 * 
 * @author loomchild
 */
public class Srx2Transformer implements SrxTransformer {

	/**
	 * Copies SRX document from reader to writer without transformation.
	 * 
	 * @param reader reader containing SRX document
	 * @param writer writer to write SRX document
	 * @param parameterMap map containing transformation parameters, ignored
	 */
	public void transform(Reader reader, Writer writer,
			Map<String, Object> parameterMap) {
// Path: segment/src/main/java/net/loomchild/segment/util/Util.java
// public static void copyAll(Reader reader, Writer writer) {
// 	try {
// 		char[] readBuffer = new char[READ_BUFFER_SIZE];
// 		int count;
// 		while ((count = reader.read(readBuffer)) != -1) {
// 			writer.write(readBuffer, 0, count);
// 		}
// 	} catch (IOException e) {
// 		throw new IORuntimeException(e);
// 	}
// }
// 
// Path: segment/src/main/java/net/loomchild/segment/srx/SrxTransformer.java
// public interface SrxTransformer {
// 
// 	/**
// 	 * Transform given SRX document to newest supported version and write it to
// 	 * given writer.
// 	 * 
// 	 * @param reader reader containing SRX document
// 	 * @param writer writer to write transformed SRX document
// 	 * @param parameterMap map containing transformation parameters
// 	 */
// 	public void transform(Reader reader, Writer writer,
// 			Map<String, Object> parameterMap);
// 
// 	/**
// 	 * Transform given SRX document and return Reader containing newest
// 	 * supported version.
// 	 * 
// 	 * @param reader reader containing SRX document
// 	 * @param parameterMap map containing transformation parameters
// 	 * @return reader containing SRX document in newest supported version
// 	 */
// 	public Reader transform(Reader reader, Map<String, Object> parameterMap);
// 
// }


// Path: segment/src/main/java/net/loomchild/segment/srx/io/Srx2Transformer.java
import static net.loomchild.segment.util.Util.copyAll;
import java.io.Reader;
import java.io.Writer;
import java.util.Map;
import net.loomchild.segment.srx.SrxTransformer;

package net.loomchild.segment.srx.io;





/**
 * Represents SRX document transformer between SRX 2.0 and newest supported
 * version. As newest supported version is 2.0 so does no transformation.
 * 
 * @author loomchild
 */
public class Srx2Transformer implements SrxTransformer {

	/**
	 * Copies SRX document from reader to writer without transformation.
	 * 
	 * @param reader reader containing SRX document
	 * @param writer writer to write SRX document
	 * @param parameterMap map containing transformation parameters, ignored
	 */
	public void transform(Reader reader, Writer writer,
			Map<String, Object> parameterMap) {
		copyAll(reader, writer);