Add getRawData() method for AggregationService.

This commit is contained in:
Jim Miller
2009-06-08 18:59:49 -07:00
parent db241b881c
commit 30636876c0

View File

@@ -192,17 +192,21 @@ public class EventLog {
return decodeObject();
}
public byte[] getRawData() {
return mBuffer.array();
}
/** @return the loggable item at the current position in mBuffer. */
private Object decodeObject() {
if (mBuffer.remaining() < 1) return null;
switch (mBuffer.get()) {
case INT:
if (mBuffer.remaining() < 4) return null;
return mBuffer.getInt();
return (Integer) mBuffer.getInt();
case LONG:
if (mBuffer.remaining() < 8) return null;
return mBuffer.getLong();
return (Long) mBuffer.getLong();
case STRING:
try {