All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.softicar.platform.common.container.array.ByteArrayIterator Maven / Gradle / Ivy

Go to download

The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.

There is a newer version: 50.0.0
Show newest version
package com.softicar.platform.common.container.array;

import java.util.Iterator;

public class ByteArrayIterator implements Iterator {

	private final byte[] array;
	private int index;

	public ByteArrayIterator(byte[] array) {

		this.array = array;
		this.index = 0;
	}

	@Override
	public boolean hasNext() {

		return index < array.length;
	}

	@Override
	public Byte next() {

		return array[index++];
	}

	@Override
	public void remove() {

		throw new UnsupportedOperationException("Remove operation not allowed on ByteArrayIterator.");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy