public class ObjectWrappingImpl extends Object implements ObjectWrapping
ObjectWrapping. Objects are wrapped in a byte array
containing the output of ObjectOutputStream.writeObject(Object).| Constructor and Description |
|---|
ObjectWrappingImpl() |
| Modifier and Type | Method and Description |
|---|---|
Object |
unwrap(Object wrapped,
ClassLoader cloader)
Unwraps an object.
|
Object |
wrap(Object obj)
Wraps an object.
|
public Object wrap(Object obj) throws IOException
ObjectWrappingwrap in interface ObjectWrappingobj - the object to be wrapped.IOException - if the object cannot be wrapped
for some reason.public Object unwrap(Object wrapped, ClassLoader cloader) throws IOException, ClassNotFoundException
ObjectWrappingunwrap in interface ObjectWrappingwrapped - the wrapped object to be unwrapped.cloader - the class loader to be used to load the object's
class. Can be null, meaning the bootstrap class loader.IOException - if the object cannot be unwrapped
for some reason.ClassNotFoundException - if the class that the
unwrapped object should have is not known to the given class
loader.Copyright © 2019 Terracotta, Inc.. All rights reserved.