Constructor and Description |
---|
DataNode(String id,
byte[] data)
Create a new data node and fill with byte buffer
|
DataNode(String id,
InputStream stream)
Create a new data node and fill with the input stream
|
DataNode(String id,
Serializable data)
Create a new data node and fill it with the serialized representation of
the data object provided.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
byte[] |
getData()
Get a copy of the data
|
Object |
getDataAsObject() |
Object |
getDataAsObject(org.osgi.framework.Bundle bundle) |
Object |
getDataAsObject(org.osgi.framework.Bundle bundle,
Object defaultValue) |
Object |
getDataAsObject(ClassLoader classLoader) |
Object |
getDataAsObject(ClassLoader classLoader,
Object defaultValue) |
Object |
getDataAsObject(Object defaultValue) |
protected Object |
getDataAsObject(ObjectInputStream stream) |
String |
getId() |
int |
hashCode() |
String |
toString() |
public DataNode(String id, byte[] data)
The byte buffer is copied by the constructor
id
- The node iddata
- the datapublic DataNode(String id, InputStream stream) throws IOException
The input stream is read into the data buffer of the node
The stream is not closed by the constructor.
id
- the node idstream
- the stream to read fromIOException
- if stream reading failspublic DataNode(String id, Serializable data)
id
- the node iddata
- the data to serializepublic String getId()
public byte[] getData()
public Object getDataAsObject() throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
protected Object getDataAsObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object getDataAsObject(ClassLoader classLoader) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object getDataAsObject(org.osgi.framework.Bundle bundle) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public Object getDataAsObject(org.osgi.framework.Bundle bundle, Object defaultValue)
public Object getDataAsObject(ClassLoader classLoader, Object defaultValue)
Copyright © 2016 Eclipse NeoSCADA Project. All rights reserved.