class DuplicatingCheckpointOutputStream extends CheckpointStreamFactory.CheckpointStateOutputStream {

	@Override
	public void write(int b) throws IOException {

		if (buffer.length <= bufferIdx) {
			flushInternalBuffer();
		}

		buffer[bufferIdx] = (byte) b;
		++bufferIdx;
	}

	public  DuplicatingCheckpointOutputStream(
		CheckpointStreamFactory.CheckpointStateOutputStream primaryOutputStream,
		CheckpointStreamFactory.CheckpointStateOutputStream secondaryOutputStream);
	public  DuplicatingCheckpointOutputStream(
		CheckpointStreamFactory.CheckpointStateOutputStream primaryOutputStream,
		CheckpointStreamFactory.CheckpointStateOutputStream secondaryOutputStream,
		int bufferSize);

}