private int pointer;
public MessageProducer(String targetURI, int amount) throws Exception {
this.amount = amount;
Serializer serializer = new Serializer();
InetAddress source = InetAddress.getByName("192.168.1.33");
int count = 0;
this.array = new ArrayList<RawData>(amount);
for (int port = 1; port < (1 << 16) && count < amount; port++) {
for (int mid = 0; mid < (1 << 16) && count < amount; mid++) {
Request request = new Request(Code.GET);
request.setType(Type.NON);
request.setToken(new byte[0]);
request.setMID(mid);
request.setURI(targetURI);
RawData raw = serializer.serialize(request);
raw.setAddress(source);
raw.setPort(port);
array.add(raw);
count++;
}