Methods Summary |
---|
private final java.lang.Object | deserializeObjectValue()
try {
InputStream inputStream = mByteOutputStream.getInputStream();
ObjectInputStream objectStream = new ObjectInputStream(inputStream);
return objectStream.readObject();
} catch (IOException e) {
throw new RuntimeException("Could not deserialize object in " + this + "!", e);
} catch (ClassNotFoundException e) {
throw new RuntimeException("Unable to deserialize object of unknown class in "
+ this + "!", e);
}
|
public android.graphics.Bitmap | getBitmap()
Object result = deserializeObjectValue();
return (result instanceof Bitmap) ? (Bitmap)result : null;
|
public java.nio.ByteBuffer | getData()
Object result = deserializeObjectValue();
return (result instanceof ByteBuffer) ? (ByteBuffer)result : null;
|
public float[] | getFloats()
Object result = deserializeObjectValue();
return (result instanceof float[]) ? (float[])result : null;
|
public int[] | getInts()
Object result = deserializeObjectValue();
return (result instanceof int[]) ? (int[])result : null;
|
public java.lang.Object | getObjectValue()
return deserializeObjectValue();
|
protected boolean | hasNativeAllocation()
return false;
|
protected void | releaseNativeAllocation()
|
private final void | serializeObjectValue(java.lang.Object object)
try {
mByteOutputStream.reset();
mObjectOut.writeObject(object);
mObjectOut.flush();
mObjectOut.close();
} catch (IOException e) {
throw new RuntimeException("Could not serialize object " + object + " in "
+ this + "!", e);
}
|
public void | setBitmap(android.graphics.Bitmap bitmap)
assertFrameMutable();
setGenericObjectValue(bitmap);
|
public void | setData(java.nio.ByteBuffer buffer, int offset, int length)
assertFrameMutable();
setGenericObjectValue(ByteBuffer.wrap(buffer.array(), offset, length));
|
public void | setFloats(float[] floats)
assertFrameMutable();
setGenericObjectValue(floats);
|
protected void | setGenericObjectValue(java.lang.Object object)
serializeObjectValue(object);
|
public void | setInts(int[] ints)
assertFrameMutable();
setGenericObjectValue(ints);
|
public java.lang.String | toString()
return "SerializedFrame (" + getFormat() + ")";
|
static android.filterfw.core.SerializedFrame | wrapObject(java.lang.Object object, android.filterfw.core.FrameManager frameManager)
FrameFormat format = ObjectFormat.fromObject(object, FrameFormat.TARGET_SIMPLE);
SerializedFrame result = new SerializedFrame(format, frameManager);
result.setObjectValue(object);
return result;
|