class WorldFileWriter {

	private void write(BufferedWriter writer, MathTransform transform){
		try {
			if ((transform instanceof IdentityTransform)) {
				writer.write("1");
				writer.newLine();
				writer.write("0");
				writer.newLine();
				writer.write("0");
				writer.newLine();
				writer.write("1");
				writer.newLine();
				writer.write("0");
				writer.newLine();
				writer.write("0");
				close(writer);
				return;
			}
			if ((transform instanceof AffineTransform2D)) {
				final AffineTransform2D affine = (AffineTransform2D) transform;
				writer.write(Double.toString(affine.getScaleX()));
				writer.newLine();
				writer.write(Double.toString(affine.getShearX()));
				writer.newLine();
				writer.write(Double.toString(affine.getShearY()));
				writer.newLine();
				writer.write(Double.toString(affine.getScaleY()));
				writer.newLine();
				writer.write(Double.toString(affine.getTranslateX()));
				writer.newLine();
				writer.write(Double.toString(affine.getTranslateY()));
				close(writer);
				return;
			}
			assert false:transform;
		} catch (IOException e) {
			if(LOGGER.isLoggable(Level.SEVERE))
				LOGGER.log(Level.SEVERE,e.getLocalizedMessage(),e);
		} finally {
			close(writer);
		}
		

	}

	public  WorldFileWriter(final File outLocation,
			final AffineTransform transform);
	public  WorldFileWriter(final File outLocation,
			final AffineTransform transform, final int buffSize);
	public  WorldFileWriter(final OutputStream outLocation,
			final AffineTransform transform);
	public  WorldFileWriter(final OutputStream outLocation,
			final AffineTransform transform, final int buffSize);
	public  WorldFileWriter(final OutputStream outLocation,
			final MathTransform transform);
	public  WorldFileWriter(final OutputStream outLocation,
			final MathTransform transform, final int buffSize);
	public  WorldFileWriter(final File outLocation, final MathTransform transform, int buffSize);
	public  WorldFileWriter(final File outLocation, final MathTransform transform);

}