2018-06-11 22:41:11 +02:00
|
|
|
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.
|
2018-06-11 22:41:11 +02:00
|
|
|
*/
|
|
|
|
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);
|
2018-06-11 22:41:11 +02:00
|
|
|
}
|