com.softicar.platform.common.container.array.ByteArrayIterator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of platform-common Show documentation
Show all versions of platform-common Show documentation
The SoftiCAR Platform is a lightweight, Java-based library to create interactive business web applications.
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.");
}
}