org.apache.lucene.index
Class PayloadProcessorProvider.PayloadProcessor

java.lang.Object
  extended by org.apache.lucene.index.PayloadProcessorProvider.PayloadProcessor
Direct Known Subclasses:
FacetsPayloadProcessorProvider.FacetsPayloadProcessor
Enclosing class:
PayloadProcessorProvider

public abstract static class PayloadProcessorProvider.PayloadProcessor
extends Object

Processes the given payload. One should call payloadLength() to get the length of the processed payload.

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
PayloadProcessorProvider.PayloadProcessor()
           
 
Method Summary
abstract  int payloadLength()
          Returns the length of the payload that was returned by processPayload(byte[], int, int).
abstract  byte[] processPayload(byte[] payload, int start, int length)
          Process the incoming payload and returns the resulting byte[].
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PayloadProcessorProvider.PayloadProcessor

public PayloadProcessorProvider.PayloadProcessor()
Method Detail

payloadLength

public abstract int payloadLength()
                           throws IOException
Returns the length of the payload that was returned by processPayload(byte[], int, int).

Throws:
IOException

processPayload

public abstract byte[] processPayload(byte[] payload,
                                      int start,
                                      int length)
                               throws IOException
Process the incoming payload and returns the resulting byte[]. Note that a new array might be allocated if the given array is not big enough. The length of the new payload data can be obtained via payloadLength().

Throws:
IOException