org.apache.flume.event
Class JSONEvent

java.lang.Object
  extended by org.apache.flume.event.JSONEvent
All Implemented Interfaces:
Event

public class JSONEvent
extends Object
implements Event


Constructor Summary
JSONEvent()
           
 
Method Summary
 byte[] getBody()
          Returns the raw byte array of the data contained in this event.
 Map<String,String> getHeaders()
          Returns a map of name-value pairs describing the data stored in the body.
 void setBody(byte[] body)
          Sets the raw byte array of the data contained in this event.
 void setCharset(String charset)
           
 void setHeaders(Map<String,String> headers)
          Set the event headers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONEvent

public JSONEvent()
Method Detail

getHeaders

public Map<String,String> getHeaders()
Description copied from interface: Event
Returns a map of name-value pairs describing the data stored in the body.

Specified by:
getHeaders in interface Event

setHeaders

public void setHeaders(Map<String,String> headers)
Description copied from interface: Event
Set the event headers

Specified by:
setHeaders in interface Event
Parameters:
headers - Map of headers to replace the current headers.

getBody

public byte[] getBody()
Description copied from interface: Event
Returns the raw byte array of the data contained in this event.

Specified by:
getBody in interface Event

setBody

public void setBody(byte[] body)
Description copied from interface: Event
Sets the raw byte array of the data contained in this event.

Specified by:
setBody in interface Event
Parameters:
body - The data.

setCharset

public void setCharset(String charset)


Copyright © 2009-2013 Apache Software Foundation. All Rights Reserved.