WarpPI/desktop/src/main/java/ar/com/hjg/pngj/IBytesConsumer.java

17 lines
454 B
Java
Raw Normal View History

package ar.com.hjg.pngj;
/**
2018-08-28 02:39:41 +02:00
* Bytes consumer. Objects implementing this interface can act as bytes
* consumers, that are "fed" with bytes.
*/
public interface IBytesConsumer {
2018-08-28 02:39:41 +02:00
/**
* Eats some bytes, at most len.
* <p>
* Returns bytes actually consumed. A negative return value signals that the
* consumer is done, it refuses to eat more
* bytes. This should only return 0 if len is 0
*/
int consume(byte[] buf, int offset, int len);
}