List of usage examples for java.beans XMLDecoder XMLDecoder
public XMLDecoder(InputSource is)
From source file:com.projity.pm.graphic.frames.GraphicManager.java
/** * Decode the current workspace (currently using XML though could be binary) * @return workspace object decoded from lastWorkspace static *//*from ww w .j a v a2 s. co m*/ private Workspace decodeWorkspaceXML() { ByteArrayInputStream stream = new ByteArrayInputStream(((String) lastWorkspace).getBytes()); XMLDecoder decoder = new XMLDecoder(new BufferedInputStream(stream)); Workspace workspace = (Workspace) decoder.readObject(); decoder.close(); return workspace; }