Package com.openinventor.inventor.misc
Class SoByteStream
java.lang.Object
com.openinventor.inventor.Inventor
com.openinventor.inventor.misc.SoByteStream
Converts scene graph objects to character byte streams.
This class creates a byte stream representation of a scene graph, using an
class passes
SoWriteAction
to write path lists to an in-memory buffer. Byte streams are commonly used to transfer data in copy and paste operations. (The
invalid reference
SoWinClipboard
SoByteStream
data during copy and paste.)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
Field Summary
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Calls convert(node, true).void
Converts the passed scene graph object(s) into a byte stream.void
Calls convert(path, true).void
Converts the passed scene graph object(s) into a byte stream.getData()
Returns the data from the lastconvert()
operation.long
Returns the number of bytes from the lastconvert()
operation.unconvert
(SoByteStream byteStream) Takes byte stream data and unconverts it back to scene graph objects.Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
Constructor Details
-
SoByteStream
public SoByteStream()Constructor.
-
-
Method Details
-
convert
Calls convert(node, true). -
convert
Calls convert(path, true). -
getData
Returns the data from the lastconvert()
operation. This byte stream format is well suited to data transfers, like copy and paste. -
convert
Converts the passed scene graph object(s) into a byte stream. The object(s) are passed by path. The caller may specify whether the byte stream is written in binary (true) or ASCII (false) format. The converted data can be accessed throughgetData()
andgetNumBytes()
. -
unconvert
Takes byte stream data and unconverts it back to scene graph objects. The objects are returned in a path list. -
convert
Converts the passed scene graph object(s) into a byte stream. The object(s) are passed by node. The caller may specify whether the byte stream is written in binary (true) or ASCII (false) format. The converted data can be accessed throughgetData()
andgetNumBytes()
. -
getNumBytes
public long getNumBytes()Returns the number of bytes from the lastconvert()
operation. This byte stream format is well suited to data transfers, like copy and paste.
-