package ga050426;

public class DataSection {
	byte location[] = null;

	public static DataSection buff = new DataSection((int) 0xFFFF);

	public DataSection(int size) {
		location = new byte[size];
	}

	public DataSection insert(byte b, int pos) {
		location[pos] = b;
		return this;
	}

	public byte get(int pos) {
		return location[pos];
	}

	public String toString() {
		StringBuffer buf = new StringBuffer();
		for (byte b : location)
			buf.append(String.format("%02x ", 0x00ff & b));
		return new String(buf);
	}
}
