// Path: segment/src/main/java/net/loomchild/segment/util/IORuntimeException.java
// public class IORuntimeException extends RuntimeException {
// 
// 	private static final long serialVersionUID = -6587044052300876023L;
// 
// 	public IORuntimeException(IOException exception) {
// 		super(exception);
// 	}
// 
// 	public void rethrow() throws IOException {
// 		throw (IOException) getCause();
// 	}
// 
// }


import java.io.IOException;
import java.io.Reader;
import net.loomchild.segment.util.IORuntimeException;
		this.bufferLength = bufferLength;
	}

	public int getBufferLength() {
		return bufferLength;
	}
	
	/**
	 * @return current text
	 */
	public CharSequence getText() {
		initText();
		return text;
	}
	
	/**
	 * @return true if more text can be read
	 */
	public boolean hasMoreText() {
		initText();
		return nextCharacter != -1;
	}
	
	/**
	 * Deletes given amount of characters from current character buffer and 
	 * tries to read up to given amount of new characters and stores them in
	 * current character buffer.
	 * @param amount amount of characters to read
	 * @throws IllegalArgumentException  if {@link #hasMoreText()} returns false or amount is greater than buffer size
	 */
// Path: segment/src/main/java/net/loomchild/segment/util/IORuntimeException.java
// public class IORuntimeException extends RuntimeException {
// 
// 	private static final long serialVersionUID = -6587044052300876023L;
// 
// 	public IORuntimeException(IOException exception) {
// 		super(exception);
// 	}
// 
// 	public void rethrow() throws IOException {
// 		throw (IOException) getCause();
// 	}
// 
// }


// Path: segment/src/main/java/net/loomchild/segment/srx/TextManager.java
import java.io.IOException;
import java.io.Reader;
import net.loomchild.segment.util.IORuntimeException;

		this.bufferLength = bufferLength;
	}

	public int getBufferLength() {
		return bufferLength;
	}
	
	/**
	 * @return current text
	 */
	public CharSequence getText() {
		initText();
		return text;
	}
	
	/**
	 * @return true if more text can be read
	 */
	public boolean hasMoreText() {
		initText();
		return nextCharacter != -1;
	}
	
	/**
	 * Deletes given amount of characters from current character buffer and 
	 * tries to read up to given amount of new characters and stores them in
	 * current character buffer.
	 * @param amount amount of characters to read
	 * @throws IllegalArgumentException  if {@link #hasMoreText()} returns false or amount is greater than buffer size
	 */
	public void readText(int amount) {