package jp.co.iti.hedgehog;

class Froglet {
	private byte[]	bytes;
	private int		mx;
	private int		ix = 0;
	
	public Froglet(byte[] bytes){
		this.bytes = bytes;
		mx = bytes.length - 1;
	}
	
	public byte get(){
		byte result = bytes[ix];
		if(ix < mx) ix++;
		else		ix = 0;
		
		return	result;
	}
}
