|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.pds.PDSEncoder
The PDSEncoder
class provides methods to encode and decode serializable objects
to and from character strings for long term (persistent) storage. It provides static
convenience methods to encode and decode a single serializable object to and from a character
string. Instances of PDSEncoder
can be used to efficiently reuse a single
java.io.ObjectInputStream
or java.io.ObjectOutputStream
to read and
write many character strings or byte streams. The encoding scheme is considered an internal
property of the encoder, but is guaranteed to be a subset of ASCII characters such as
Base64-encoding.
The object input and object output streams implement wt.pds.PDSObjectInput
and
wt.pds.PDSObjectOutput
interfaces. These are tagging interfaces used by some
Windchill classes to identify when they are being serialized for long term storage. The object
output stream will optionally warn or abort attempts to serialize objects that implement the
wt.fc.NetFactor
interface if they do not also implement the
wt.fc.Evolvable
interface. This behavior is controlled by the
wt.pds.notEvolvableAction
properties. Valid values are "none", "warning",
"traceback", and "exception". The default is "warning".
NOTE: This class duplicates code that exists in wt.util.Encoder
. Any changes to
this class should be reflected there as well.
Supported API: false
Extendable: false
Nested Class Summary | |
(package private) static class |
PDSEncoder.DecodeObjectInputStream
|
(package private) static class |
PDSEncoder.EncodeObjectOutputStream
|
(package private) static class |
PDSEncoder.InputRedirector
|
(package private) static class |
PDSEncoder.OutputRedirector
|
(package private) static class |
PDSEncoder.RewriteCheckingDecodeObjectInputStream
This class exists to deal with bad versions of the wt.meta.LocalizedValue class if they're encountered during (small)blob decodings. |
(package private) static class |
PDSEncoder.SerializationMappingEntry
|
Field Summary | |
private PDSEncoder.DecodeObjectInputStream |
decodeStream
|
private PDSEncoder.EncodeObjectOutputStream |
encodeStream
|
private static String |
PJL60LV_JAR_URL
|
private static ClassLoader |
repairingClassLoaderForPjl60__
|
private static ClassLoader |
repairingClassLoaderForWnc620__
|
private static String |
WNC620LV_JAR_URL
|
Constructor Summary | |
PDSEncoder()
|
Method Summary | |
static Serializable |
decode(String str)
Produces a serializable object from the encoded string argument. |
static String |
encode(Serializable obj)
Produces an encoded string from an object argument. |
private static ClassLoader |
getRepairingClassLoaderForPjl60()
A class loader that loads the bad pjl.6.(0|1)) version of wt.meta.LocalizedValue class from a special jar. |
private static ClassLoader |
getRepairingClassLoaderForWnc620()
A class loader that loads the bad 6.2.(0|1) version of wt.meta.LocalizedValue class from a special jar. |
private static ClassLoader |
newRepairingClassLoader(String relative_jar_url)
|
ObjectInputStream |
setInput(InputStream in)
Set a input stream to read next object stream. |
ObjectInputStream |
setInput(String str)
Set a string to read next encoded object stream. |
ObjectOutputStream |
setOutput(OutputStream out)
Set a output stream to receive the next object stream. |
ObjectOutputStream |
setOutput(StringBuffer buf)
Set a string buffer to receive the next encoded object stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private PDSEncoder.EncodeObjectOutputStream encodeStream
private PDSEncoder.DecodeObjectInputStream decodeStream
private static ClassLoader repairingClassLoaderForWnc620__
private static ClassLoader repairingClassLoaderForPjl60__
private static final String WNC620LV_JAR_URL
private static final String PJL60LV_JAR_URL
Constructor Detail |
public PDSEncoder()
Method Detail |
public static String encode(Serializable obj) throws IOException
Encoder
object is
constructed to perform the serialization.
obj
- Serializable object to be encoded
IOException
public static Serializable decode(String str) throws IOException, ClassNotFoundException
str
- encoded string returned by encode operation
IOException
ClassNotFoundException
public ObjectOutputStream setOutput(StringBuffer buf) throws IOException
buf
- the StringBuffer
ObjectOutputStream
for writing to this buffer
IOException
public ObjectOutputStream setOutput(OutputStream out) throws IOException
out
- the OutputStream
ObjectOutputStream
for writing to this byte stream
IOException
public ObjectInputStream setInput(String str) throws IOException
str
- the String
ObjectInputStream
for reading this string
IOException
public ObjectInputStream setInput(InputStream in) throws IOException
in
- the InputStream
ObjectInputStream
for reading this stream
IOException
private static ClassLoader getRepairingClassLoaderForWnc620() throws MalformedURLException
MalformedURLException
private static ClassLoader getRepairingClassLoaderForPjl60() throws MalformedURLException
MalformedURLException
private static ClassLoader newRepairingClassLoader(String relative_jar_url)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |