public int read()
	throws IOException {
	
	if( this.isClosed )
	    throw new IOException( "Cannot read from a closed stream." );

	int b;

	// Are there still bytes left to read from the latest replacement?
	if( this.currentReplacementBuffer != null ) {
	    b = this.currentReplacementBuffer.read();
	    if( this.currentReplacementBuffer.available() == 0 )
		this.currentReplacementBuffer = null;
	    return b;
	}
	
	// Try to read next byte from the MultiStopMarkInputStream.
	b = this.multiIn.read();
	if( b != -1 )
	    return b; // No stop mark nor EOI reached.
	

	if( this.multiIn.eoiReached() )
	    return -1;  // EOI finally reached. No more bytes available.

	// Got -1 but EOI was not reached -> there must be a stop mark hit
	if( !this.multiIn.stopMarkReached() ) 
	    throw new RuntimeException( "Illegal state: found -1 but not EOI nor stop mark was reached. Cannot continue." );

	byte[] stopMark = this.multiIn.getReachedStopMark(); // Cannot be null
	this.multiIn.continueStream();

	byte[] replacement = this.replacementMap.get( stopMark ); // Cannot be null, too
	this.currentReplacementBuffer = new ByteArrayInputStream( replacement );
	
	return this.read();  // Recursive call.
    }