Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.common.io
Interface ByteProcessor<T>

    @Beta
    public interface ByteProcessor<T>

A callback interface to process bytes from a stream.

`processBytes(byte[], int, int)` will be called for each line that is read, and should return `false` when you want to stop processing.

Since:
  1.0
Author:
  Chris Nokleberg

Method Summary
`T` | `getResult()` Return the result of processing all the bytes.
`boolean` | `processBytes(byte[] buf, int off, int len)` This method will be called for each chunk of bytes in an input stream.

Method Detail

### processBytes

    boolean processBytes(byte[] buf,
                         int off,
                         int len)
                         throws IOException

  This method will be called for each chunk of bytes in an input stream. The implementation should process the bytes from `buf[off]` through `buf[off + len - 1]` (inclusive).

  Parameters:
    `buf` - the byte array containing the data to process
    `off` - the initial offset into the array
    `len` - the length of data to be processed
  Returns:
    true to continue processing, false to stop
  Throws:
    `IOException`

### getResult

    T getResult()

  Return the result of processing all the bytes.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010-2012. All Rights Reserved.