Class ExternalizableHelper
- Direct Known Subclasses:
AbstractAggregator
,AbstractExtractor
,AbstractPofValue
,AbstractPriorityTask
,AbstractQueryRecorderFilter
,AbstractUpdater
,ArrayFilter
,CompositeAggregator
,CompositeKey
,DecoratedBinaryDeltaCompressor
,DecorationOnlyDeltaCompressor
,DefaultKeyPartitioningStrategy
,ExternalizableHelper.IntDecoratedObject
,ExtractorEventTransformer
,FilterTrigger
,GroupAggregator
,KeyAssociatedFilter
,MapEventFilter
,MapEventTransformerFilter
,Ownership
,PartitionedFilter
,PermissionInfo
,PofValueParser
,PresentFilter
,PropertyAdapter
,SafeConfigurablePofContext.ExternalSerializer
,SafeConfigurablePofContext.SafePofSerializer
,SamplingEventTransformer
,SemiLiteEventTransformer
,SimpleValue
,XmlBean
Note: This class is configured via the
ExternalizableHelper.xml document located in the same package as
the class. The location of the configuration file can be overridden using
the coherence.externalizable.config
system
property.
- Author:
- cp 2003.03.28
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
DecoratedMultiBufferReadBuffer is a MultiBufferWriteBuffer that represents a binary "decorated" value, and allows a more optimizedgetUndecorated(ReadBuffer)
operation.static class
Default ObjectStreamFactory implementation.static class
A DeltaCompressor wrapper implementation that removes/replaces the serialization format byte (FMT_EXT) before/after delegating to the underlying compressor.protected static final class
Integer decorated object.static interface
Marker interface.static class
An OutputStream that implements DataOutput that delegates all operations other than flush and close to an underlying object that implements DataOutput.static class
An InputStream that delegates all operations other than close to an underlying InputStream.static class
An OutputStream that implements ObjectOutput that delegates all operations other than flush and close to an underlying object that implements ObjectOutput.static class
An OutputStream that delegates all operations other than flush and close to an underlying OutputStream.static class
An implementation XmlBeanClassCache that uses a pre-defined list of XmlBean implementations.protected static class
Serialization statistics for a given user type.static interface
An interface for caching class reference by integer ID values.Nested classes/interfaces inherited from class com.tangosol.util.Base
Base.LoggingWriter
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Binary overhead.static final int
When using the chunking algorithm each chunk is constrained to 64MB by default.static final int
A threshold used to decide whether to perform deserialization using a chunking algorithm; default is greater than 128MB.static final Converter
A converter from Binary to Object format, which uses the DefaultSerializer.static final Converter
A pass-through Binary converter that removes an IntDecoration if present.static final Converter
A converter from Object to Binary format that uses the DefaultSerializer.static final int
Decoration: Application-assignable decoration; this decoration will not be used, modified or overwritten by Coherence or other Oracle products.static final int
Decoration: Application-assignable decoration; this decoration will not be used, modified or overwritten by Coherence or other Oracle products.static final int
Decoration: Application-assignable decoration; this decoration will not be used, modified or overwritten by Coherence or other Oracle products.static final int
Decoration: Suggests the backup is not in sync.static final int
Decoration: A client specific value (opaque).static final int
Decoration: The expiry for the value.static final int
Decoration range: The maximum decoration identifier.static final int
Decoration range: The minimum decoration identifier.static final int
Decoration: Holds JCache specific meta-information for an entry.static final int
Decoration: Indicates if an update or delete is considered to be synthetic for JCache.static final int
Decoration: Information managed on behalf of Memcached acceptor.static final int
Decoration: Information managed on behalf of Push Replication.static final int
Decoration: Information about a queue elementstatic final int
Decoration: Reserved for future use by Coherence; do not use.static final int
Decoration: The persistent state for the value.static final int
Decoration: Information managed on behalf of the transactions implementation.static final int
Decoration: The original value (before being decorated).static final int
Decoration: Information managed on behalf of WebLogic.static final Binary[]
An empty array of Binary objects.static final int
Serialization format: Byte array value.static final int
Serialization format: Decorated Binary value.static final int
Serialization format: Extended-range Decorated Binary value.static final int
Serialization format: Binary value.static final int
Serialization format: Boolean value.static final int
Serialization format: Byte value.static final int
Serialization format: BigDecimal value.static final int
Serialization format: Double value.static final int
Serialization format: A DefaultSerializer is NOT used.static final int
Serialization format: Float value.static final int
Serialization format: Integer-decorated value.static final int
Serialization format: Integer value.static final int
Serialization format: BigInteger value.static final int
Serialization format: Long value.static final int
Serialization format: Unknown value (alias to FMT_UNKNOWN).static final int
Serialization format: Null value.static final int
Serialization format: ExternalizableLite value.static final int
Serialization format: Serializable value.static final int
Serialization format: Optional value.static final int
Serialization format: OptionalDouble value.static final int
Serialization format: OptionalInt value.static final int
Serialization format: OptionalLong value.static final int
Serialization format: Short value.static final int
Serialization format: String value.static final int
Serialization format: Unknown value.static final int
Serialization format: XmlBean value.static final int
Serialization format: XmlSerializable value.static final boolean
Option: Always use a ResolvingObjectInputStream, even if a regular ObjectInputStream is available.static final String
Option: Use eitherstatic
ordynamic
lambda serialization.protected static final int
The maximum number of bytes the header of the binary-decorated value may contain.static final int
Maximum size of a packed int.static final int
Maximum size of a packed long.static final String
The name of the system property that can be used to override the location of the ExternalizableHelper configuration file.static ObjectStreamFactory
Option: Configurable ObjectStreamFactory.static final int
Trints use 6 hexits (3 bytes), so the trint domain span is 0x01000000.static final int
Trints use 6 hexits (3 bytes), so the trint maximum is 0x00FFFFFF.static final int
Trints use 6 hexits (3 bytes), so the trint maximum variance (from a "current" value) is half the trint domain span, or 0x00800000.static final boolean
Option: Use POF as the default serialization format.static final boolean
Option: Use an XmlBean class cache.static final ExternalizableHelper.XmlBeanClassCache
Option: XmlBean class cache implementation. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Binary
asBinary
(ReadBuffer buf) Return a Binary representing the contents of the specified ReadBuffer, or null if the buffer is null.static int
calculatePackedLength
(int n) Calculate the number of bytes needed to store a packed integer using a variable-length format.static int
calculatePackedLength
(long l) Calculate the number of bytes needed to store a packed long using a variable-length format.protected static boolean
checkObjectInputFilter
(Class<?> clz, int cLength, DataInput in) Return true if the provided class is allowed to be deserialized.protected static boolean
checkObjectInputFilter
(Class<?> clz, DataInput in) Return true if the provided class is allowed to be deserialized.protected static boolean
checkObjectInputFilter
(Class<?> clz, ObjectInputStream ois) Return true if the provided class is allowed to be deserialized.static String
convertUTF
(byte[] ab, int of, int cb, char[] ach) Convert binary UTF-8 encode data to a String.static long
decodeExpiry
(ReadBuffer buf) Decode the expiry time from the specified ReadBuffer.static ReadBuffer
decorate
(ReadBuffer bufOrig, int nId, ReadBuffer bufDeco) Decorate the passed value with the specified decoration and return the resulting ReadBuffer.static ReadBuffer
decorate
(ReadBuffer buf, ReadBuffer[] abufDeco) Decorate the passed Binary with the passed decorations.static Binary
Decorate the passed value with the specified decoration and return the resulting Binary.static Binary
Deprecated.as of Coherence 3.7.2Decorate the specified value with the specified integer decoration.static ReadBuffer
decorateBinary
(ReadBuffer bufValue, int nDecoration) Decorate the specified ReadBuffer with the specified integer decoration.static ReadBuffer
encodeExpiry
(ReadBuffer buf, long ldtExpiry) Return a ReadBuffer whose contents represent the specified buffer with the specified expiry encoded as a DECO_EXPIRY decoration.static Serializer
ensureSerializer
(ClassLoader loader) Obtain a Serializer for the specified ClassLoader.static int
Extract a decoration value from the specified ReadBuffer that contains a representation of an IntDecoratedObject.static <T> T
fromBinary
(Binary bin) Read an object from a Binary object.static <T> T
fromBinary
(Binary bin, Serializer serializer) Read an object from a Binary object using the specified Serializer.static <T> T
fromBinary
(Binary bin, Serializer serializer, Remote.Function<ReadBuffer.BufferInput, ReadBuffer.BufferInput> supplier) Read an object from a Binary object using the specified Serializer.static <T> T
fromBinary
(Binary bin, Serializer serializer, Remote.Function<ReadBuffer.BufferInput, ReadBuffer.BufferInput> supplier, Class<T> clazz) Read an object from a Binary object using the specified Serializer and expected class.static <T> T
fromBinary
(Binary bin, Serializer serializer, Class<T> clazz) Read an object from a Binary object using the specified Serializer and expected class.static <T> T
fromBinary
(Binary bin, ClassLoader loader) Read an object from a Binary object.static Object
fromByteArray
(byte[] ab) Read an object from a byte array.static Object
fromByteArray
(byte[] ab, ClassLoader loader) Read an object from a byte array.static Class
Return class for the specified class name; null if not found.static Object
Return the static JVM-wide serial filter ornull
if not configured.static BinaryOperator
Return the static JVM-wide serial filter factory.static ReadBuffer
getDecoration
(ReadBuffer buf, int nId) Extract and return the specified decoration from the passed ReadBuffer.static Binary
getDecoration
(Binary bin, int nId) Deprecated.as of Coherence 3.7.2static ReadBuffer[]
getDecorations
(ReadBuffer buf) Return an array containing all of the decorations from the passed ReadBuffer.static DeltaCompressor
getDeltaCompressor
(Serializer serializer, DeltaCompressor compressor) Return a DeltaCompressor suitable for compressing/extracting binaries produced by ExternalizableHelper using the specified serializer.static InputStream
Get an InputStream for the passed DataInput object.static ObjectInput
getNewObjectInput
(DataInput in, ClassLoader loader) Get a new ObjectInput for the passed DataInput, even if the passed DataInput is an ObjectInput.static ObjectInput
getObjectInput
(DataInput in, ClassLoader loader) Get an ObjectInput for the passed DataInput object.protected static Object
Return ObjectInputFilter associated withDataInput
.static ObjectOutput
Get an ObjectOutput for the passed DataOutput object.static ObjectStreamFactory
Return the ObjectStreamFactory used to convert DataInput/Output into ObjectInput/Output streams.static OutputStream
Get an OutputStream for the passed DataOutput object.static OutputStream
Get a shielded OutputStream for the passed OutputStream object.static int
Internal: Select an optimal stream format to use to store the passed object in a stream (as used by the DefaultSerializer).static ReadBuffer
getUndecorated
(ReadBuffer buf) If the passed ReadBuffer is decorated, extract the original contents that the decorations were added to, otherwise return the passed Binary value.static Binary
getUndecorated
(Binary bin) Deprecated.as of Coherence 3.7.2static boolean
isDecorated
(ReadBuffer buf) If the ReadBuffer is the result of serialization by ExternalizableHelper, determine if the buffer contains decorations.static boolean
isDecorated
(ReadBuffer buf, int nId) If the ReadBuffer is the result of serialization by ExternalizableHelper, determine if the buffer contains the specified decoration.static boolean
isIntDecorated
(ReadBuffer buf) Deprecated.useisIntDecorated(ByteSequence)
insteadstatic boolean
Check whether or not the specified ByteSequence is a representation of an IntDecoratedObject.static boolean
isResolving
(DataOutput out) Determine whether the passed DataOutput handles ClassLoader resolving.static boolean
Determine if the resource object can be serialized using the DefaultSerializer.static boolean
isSerializerCompatible
(Serializer serializerThis, Serializer serializerThat) Determines whether or not the specified serializers are compatible.static boolean
isVersionCompatible
(DataInput in, int nYear, int nMonth, int nPatch) Determine whether the sender of the content (the given DataInput) runs a version that supersedes (greater or equal to) the specified version.static boolean
isVersionCompatible
(DataInput in, int nMajor, int nMinor, int nMicro, int nPatchSet, int nPatch) Determine whether the sender of the content (the given DataInput) runs a version that supersedes (greater or equal to) the specified version.static boolean
isVersionCompatible
(DataOutput out, int nYear, int nMonth, int nPatch) Determine whether all the recipients of the content (the given DataOutput) run versions that supersede (greater or equal to) the specified version.static boolean
isVersionCompatible
(DataOutput out, int nMajor, int nMinor, int nMicro, int nPatchSet, int nPatch) Determine whether all the recipients of the content (the given DataOutput) run versions that supersede (greater or equal to) the specified version.static Class
loadClass
(String sClass, ClassLoader loader1, ClassLoader loader2) Attempt to load the specified class using sequentionally all of the specified loaders, the ContextClassLoader and the current class loader.static URL
loadResource
(String sName, ClassLoader loader1, ClassLoader loader2) Attempt to find a valid, resolvable URL for the specified resource, first by using each of the specified ClassLoaders, then using the ContextClassLoader.static void
Parse a hex string representing a serialized object.static int
makeTrint
(long l) Convert a long integer to a trint.static BigDecimal
Read a BigDecimal from a DataInput stream.static BigInteger
Read a BigInteger from a DataInput stream.static boolean[]
Read a packed boolean array.protected static boolean[]
readBooleanArray
(DataInput in, int cLength) Read the specified number of booleans from a boolean array.static byte[]
Read a variable-length encoded byte array.protected static char[]
readCharArray
(Utf8Reader reader, int cLength) Read an array of char for the specified length from the reader.static char[]
Read a char array.static int
readCollection
(DataInput in, Collection collection, ClassLoader loader) Read collection content from a DataInput stream and update the specified collection.static Date
Read a Date from a DataInput stream.static double[]
Read an array of double numbers from a DataInput stream.protected static double[]
readDoubleArray
(DataInput in, int cdfl) Read an array of the specified number of doubles from a DataInput stream.static ExternalizableLite
Read an ExternalizableLite object from a DataInput stream.static ExternalizableLite
readExternalizableLite
(DataInput in, ClassLoader loader) Read an ExternalizableLite object from a DataInput stream.static float[]
Read an array of float numbers from a DataInput stream.protected static float[]
readFloatArray
(DataInput in, int cfl) Read an array of the specified number of floats from a DataInput stream.static int
Read an int that uses variable length storage in the buffer.static int
Read an int that uses variable length storage in the stream.static int[]
Read an array of int numbers from a DataInput stream which use fixed-length 4-byte Big Endian binary format.protected static int[]
readIntArray
(DataInput in, int c) Read an array of the specified number of int from a DataInput stream.static int[][]
Read a 2-dimensional int-array from the stream.protected static boolean[]
readLargeBooleanArray
(DataInput in, int cLength) Read a boolean array with length larger thanCHUNK_THRESHOLD
.protected static byte[]
readLargeByteArray
(DataInput in, int cb) Read byte array with length larger thanCHUNK_THRESHOLD
.protected static char[]
readLargeCharArray
(Utf8Reader reader, int cLength) Read an array of char for the specified length from the reader.protected static double[]
readLargeDoubleArray
(DataInput in, int cLength) Read a double array with length larger thanCHUNK_THRESHOLD
>> 3.protected static float[]
readLargeFloatArray
(DataInput in, int cLength) Read a float array with length larger thanCHUNK_THRESHOLD
>> 2.protected static int[]
readLargeIntArray
(DataInput in, int cLength) Read an array of ints with length larger thanCHUNK_THRESHOLD
>> 2.protected static long[]
readLargeLongArray
(DataInput in, int cLength) Read an array of longs with length larger thanCHUNK_THRESHOLD
>> 3.protected static Object[]
readLargeObjectArray
(DataInput in, int cLength) Read an array of objects with length larger thanCHUNK_THRESHOLD
>> 4.protected static String[]
readLargeStringArray
(DataInput in, int c) Read array of string with length larger than thresholdCHUNK_THRESHOLD
>> 3.static long
Read a long that uses variable length storage in the buffer.static long
Read a long that uses variable length storage in the stream.static long[]
Read an array of long numbers from a DataInput stream that use fixed-length 8-byte Big Endian binary format.protected static long[]
readLongArray
(DataInput in, int cLength) Read an array of the specified number of longs from a DataInput stream.static int
readMap
(DataInput in, Map map, int cBlock, ClassLoader loader) Read map content from a DataInput stream and update the specified map using the "putAll" method.static int
readMap
(DataInput in, Map map, ClassLoader loader) Read map content from a DataInput stream and update the specified map.static <T> T
readObject
(DataInput in) Read an Object from the passed DataInput object.static <T> T
readObject
(DataInput in, ClassLoader loader) Read an Object from the passed DataInput object.static Object[]
Read an array of object from a DataInput stream.protected static Object[]
readObjectArray
(DataInput in, int cLength) Read an array of the specified number of object from a DataInput stream.static String
Read a variable-length encoded UTF packed String in the buffer.static String
readSafeUTF
(DataInput in) Read a variable-length encoded UTF packed String.static Object
Read an object from a DataInput stream.static Object
readSerializable
(DataInput in, ClassLoader loader) Read an object from a DataInput stream.static String[]
Read a String array.protected static String[]
readStringArray
(DataInput in, int c) Read array of string for the specified size.static Time
Read a Time from a DataInput stream.static Timestamp
Read a Timestamp from a DataInput stream.static int
Read a signed three-byte integer value from a stream.static int
Read an unsigned three-byte integer value from a stream.static String
Read a variable-length encoded UTF packed String.static XmlBean
readXmlBean
(DataInput in, ClassLoader loader) Read an XmlBean object from a DataInput stream.static XmlSerializable
Read an XmlSerializable object from a DataInput stream.static XmlSerializable
readXmlSerializable
(DataInput in, ClassLoader loader) Read an XmlSerializable object from a DataInput stream.static <T> T
realize
(Object o, Serializer serializer) Realizes object after deserialization by applying post-serialization rules.static ReadBuffer
Remove a decoration value from the specified ReadBuffer that contains a representation of an IntDecoratedObject.static Binary
Deprecated.as of Coherence 3.7.2static Object
Potentially replaces specified argument with a different object before serialization.static void
reportIncompatibleSerializers
(NamedCache cache, String sService, Serializer serializer) Log the message explaining the serializer incompatibility between the specified cache and a service.static void
Specify an ObjectStreamFactory that should be used to convert DataInput/Output into ObjectInput/Output streams.static Binary
Write an object into a Binary object.static Binary
toBinary
(Object o, Serializer serializer) Write an object into a Binary object using the specified Serializer.static Binary
toBinary
(Object o, Serializer serializer, WriteBuffer buf) Write an object into a Binary object using the specified Serializer.static byte[]
toByteArray
(long l, byte[] ab) Convert a long to an 8-byte byte array.static byte[]
Write an object to a byte array.static byte[]
toByteArray
(Object o, Serializer serializer) Write an object to a byte array using the specified Serializer.static Binary
Write an ExternalizableLite object into a Binary object.static long
toLong
(byte[] ab) Convert a byte array to a long.static ReadBuffer
undecorate
(ReadBuffer buf, int nId) Remove the specified decoration from the passed ReadBuffer and return the resulting contents (which may be undecorated, or contain the remaining decorations).static Binary
undecorate
(Binary bin, int nId) Deprecated.as of Coherence 3.7.2static void
validateBufferSize
(int cb) Verify that the requested buffer size is smaller than the configured maximum.static void
validateLoadArray
(Class clz, int cLength, DataInput in) Validate that the given class and array length is permitted to be deserialized by consulting any associated ObjectInputFilters.protected static void
validateLoadClass
(Class clz, DataInput in) Validate that the given class is permitted to be deserialized by consulting any associated ObjectInputFilters.static void
writeBigDecimal
(DataOutput out, BigDecimal dec) Write a BigDecimal to a DataOutput stream.static void
writeBigInteger
(DataOutput out, BigInteger bigint) Write a BigInteger to a DataOutput stream.static void
writeBooleanArray
(DataOutput out, boolean[] af) Write a packed boolean array.static void
writeByteArray
(DataOutput out, byte[] ab) Write a variable-length encoded byte array.static void
writeCollection
(DataOutput out, Collection collection) Write collection content to a DataOutput stream.static void
writeDate
(DataOutput out, Date date) Write a Date to a DataOutput stream.static void
writeDoubleArray
(DataOutput out, double[] ad) Write an array of double numbers to a DataOutput stream.static void
Write an ExternalizableLite object to a DataOutput stream.static void
writeFloatArray
(DataOutput out, float[] afl) Write an array of float numbers to a DataOutput stream.static void
writeInt
(WriteBuffer.BufferOutput out, int n) Write an int to a buffer using a variable length of storage.static void
writeInt
(DataOutput out, int n) Write an int to a stream using a variable length of storage.static void
writeIntArray2d
(DataOutput out, int[][] aai) Write a 2-dimensional int-array to the streamstatic void
writeLong
(WriteBuffer.BufferOutput out, long l) Write a long to a buffer using a variable length of storage.static void
writeLong
(DataOutput out, long l) Write a long to a stream using a variable length of storage.static void
writeMap
(DataOutput out, Map map) Write map content to a DataOutput stream.static void
writeObject
(DataOutput out, Object o) Write the specified data to the passed DataOutput object.static void
Write a variable-length encoded UTF packed String to the buffer.static void
writeSafeUTF
(DataOutput out, String s) Write a variable-length encoded UTF packed String.static void
writeSerializable
(DataOutput out, Object o) Write an object to a DataOutput stream.static void
writeStringArray
(DataOutput out, String[] as) Write a String array.static void
writeTime
(DataOutput out, Time time) Write a Time to a DataOutput stream.static void
writeTimestamp
(DataOutput out, Timestamp dt) Write a Timestamp to a DataOutput stream.static void
writeTrint
(DataOutput out, int n) Write a three-byte integer value to a stream.static void
writeTrint
(DataOutput out, long l) Write a three-byte integer value to a stream.static void
writeUTF
(DataOutput out, String s) Write a variable-length encoded UTF packed String.static void
writeXmlBean
(DataOutput out, XmlBean bean) Write an XmlBean object to a DataOutput stream.static void
Write an XmlSerializable object to a DataOutput stream.Methods inherited from class com.tangosol.util.BitHelper
countBits, countBits, countBits, indexOfLSB, indexOfLSB, indexOfLSB, indexOfMSB, indexOfMSB, indexOfMSB, rotateLeft, rotateLeft, rotateLeft, rotateRight, rotateRight, rotateRight, toBitString, toBitString, toBitString, toBytes, toBytes, toBytes, toBytes, toInt, toInt, toLong
Methods inherited from class com.tangosol.util.Base
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
-
Field Details
-
FMT_NONE
public static final int FMT_NONESerialization format: Unknown value (alias to FMT_UNKNOWN).- See Also:
-
FMT_UNKNOWN
public static final int FMT_UNKNOWNSerialization format: Unknown value.- See Also:
-
FMT_NULL
public static final int FMT_NULLSerialization format: Null value.- See Also:
-
FMT_INT
public static final int FMT_INTSerialization format: Integer value.- See Also:
-
FMT_LONG
public static final int FMT_LONGSerialization format: Long value.- See Also:
-
FMT_DOUBLE
public static final int FMT_DOUBLESerialization format: Double value.- See Also:
-
FMT_INTEGER
public static final int FMT_INTEGERSerialization format: BigInteger value.- See Also:
-
FMT_DECIMAL
public static final int FMT_DECIMALSerialization format: BigDecimal value.- See Also:
-
FMT_STRING
public static final int FMT_STRINGSerialization format: String value.- See Also:
-
FMT_BINARY
public static final int FMT_BINARYSerialization format: Binary value.- See Also:
-
FMT_B_ARRAY
public static final int FMT_B_ARRAYSerialization format: Byte array value.- See Also:
-
FMT_XML_SER
public static final int FMT_XML_SERSerialization format: XmlSerializable value.- See Also:
-
FMT_OBJ_EXT
public static final int FMT_OBJ_EXTSerialization format: ExternalizableLite value.- See Also:
-
FMT_OBJ_SER
public static final int FMT_OBJ_SERSerialization format: Serializable value.- See Also:
-
FMT_XML_BEAN
public static final int FMT_XML_BEANSerialization format: XmlBean value.- See Also:
-
FMT_IDO
public static final int FMT_IDOSerialization format: Integer-decorated value.- See Also:
-
FMT_FLOAT
public static final int FMT_FLOATSerialization format: Float value.- See Also:
-
FMT_SHORT
public static final int FMT_SHORTSerialization format: Short value.- See Also:
-
FMT_BYTE
public static final int FMT_BYTESerialization format: Byte value.- See Also:
-
FMT_BOOLEAN
public static final int FMT_BOOLEANSerialization format: Boolean value.- See Also:
-
FMT_BIN_DECO
public static final int FMT_BIN_DECOSerialization format: Decorated Binary value.Structure is:
byte 0 : format identifier (18) byte 1 : bit mask of decoration identifiers (see DECO_* constants) byte 2 : packed int specifying the length of the first decoration byte next : binary data ...
For each decoration, there is a packed int for its length, followed by its binary data. The first decoration is the decorated value itself, if present.Note: FMT_IDO cannot be combined with FMT_BIN_DECO.
- See Also:
-
FMT_BIN_EXT_DECO
public static final int FMT_BIN_EXT_DECOSerialization format: Extended-range Decorated Binary value.Structure is:
byte 0 : format identifier (19) byte 1 : bit mask of decoration identifiers (see DECO_* constants), in the packed long format (1-10 bytes) byte next : packed int specifying the length of the first decoration byte next : binary data ...
For each decoration, there is a packed int for its length, followed by its binary data. The first decoration is the decorated value itself, if present.Note: FMT_IDO cannot be combined with FMT_BIN_EXT_DECO.
- See Also:
-
FMT_EXT
public static final int FMT_EXTSerialization format: A DefaultSerializer is NOT used.- See Also:
-
FMT_OPT
public static final int FMT_OPTSerialization format: Optional value.- See Also:
-
FMT_OPT_INT
public static final int FMT_OPT_INTSerialization format: OptionalInt value.- See Also:
-
FMT_OPT_LONG
public static final int FMT_OPT_LONGSerialization format: OptionalLong value.- See Also:
-
FMT_OPT_DOUBLE
public static final int FMT_OPT_DOUBLESerialization format: OptionalDouble value.- See Also:
-
DECO_ID_MIN
public static final int DECO_ID_MINDecoration range: The minimum decoration identifier.- See Also:
-
DECO_ID_MAX
public static final int DECO_ID_MAXDecoration range: The maximum decoration identifier.- See Also:
-
DECO_VALUE
public static final int DECO_VALUEDecoration: The original value (before being decorated).- See Also:
-
DECO_EXPIRY
public static final int DECO_EXPIRYDecoration: The expiry for the value.- See Also:
-
DECO_STORE
public static final int DECO_STOREDecoration: The persistent state for the value.- See Also:
-
DECO_TX
public static final int DECO_TXDecoration: Information managed on behalf of the transactions implementation.- See Also:
-
DECO_PUSHREP
public static final int DECO_PUSHREPDecoration: Information managed on behalf of Push Replication.- See Also:
-
DECO_BACKUP
public static final int DECO_BACKUPDecoration: Suggests the backup is not in sync.- See Also:
-
DECO_RSVD_1
public static final int DECO_RSVD_1Decoration: Reserved for future use by Coherence; do not use.- See Also:
-
DECO_CUSTOM
public static final int DECO_CUSTOMDecoration: A client specific value (opaque). The original intent of the "custom" decoration was that it would be reserved for use by application code, but previous to Coherence 3.7 it was also used for the OptimisticNamedCache implementation, the TopLink Grid implementation and the Coherence Incubator's "Push Replication" project. As of Coherence 3.7, this attribute is once again made available to frameworks and applications, although care must be taken to avoid using the versions of any of the frameworks that utilized this decoration. Applications are instead encouraged to use the newDECO_APP_1
,DECO_APP_2
andDECO_APP_3
decorations.- See Also:
-
DECO_WLS
public static final int DECO_WLSDecoration: Information managed on behalf of WebLogic.- See Also:
-
DECO_APP_1
public static final int DECO_APP_1Decoration: Application-assignable decoration; this decoration will not be used, modified or overwritten by Coherence or other Oracle products.- See Also:
-
DECO_APP_2
public static final int DECO_APP_2Decoration: Application-assignable decoration; this decoration will not be used, modified or overwritten by Coherence or other Oracle products.- See Also:
-
DECO_APP_3
public static final int DECO_APP_3Decoration: Application-assignable decoration; this decoration will not be used, modified or overwritten by Coherence or other Oracle products.- See Also:
-
DECO_MEMCACHED
public static final int DECO_MEMCACHEDDecoration: Information managed on behalf of Memcached acceptor.- See Also:
-
DECO_JCACHE
public static final int DECO_JCACHEDecoration: Holds JCache specific meta-information for an entry.- See Also:
-
DECO_JCACHE_SYNTHETIC
public static final int DECO_JCACHE_SYNTHETICDecoration: Indicates if an update or delete is considered to be synthetic for JCache. (this is not the same as a Coherence synthetic update)- See Also:
-
DECO_QUEUE_METADATA
public static final int DECO_QUEUE_METADATADecoration: Information about a queue element- See Also:
-
MAX_DECO_HEADER_BYTES
protected static final int MAX_DECO_HEADER_BYTESThe maximum number of bytes the header of the binary-decorated value may contain.- See Also:
-
TRINT_DOMAIN_SPAN
public static final int TRINT_DOMAIN_SPANTrints use 6 hexits (3 bytes), so the trint domain span is 0x01000000.- See Also:
-
TRINT_MAX_VALUE
public static final int TRINT_MAX_VALUETrints use 6 hexits (3 bytes), so the trint maximum is 0x00FFFFFF.- See Also:
-
TRINT_MAX_VARIANCE
public static final int TRINT_MAX_VARIANCETrints use 6 hexits (3 bytes), so the trint maximum variance (from a "current" value) is half the trint domain span, or 0x00800000.- See Also:
-
EMPTY_BINARY_ARRAY
An empty array of Binary objects. -
PACKED_LONG_SIZE
public static final int PACKED_LONG_SIZEMaximum size of a packed long.- See Also:
-
PACKED_INT_SIZE
public static final int PACKED_INT_SIZEMaximum size of a packed int.- See Also:
-
BINARY_SIZE
public static final int BINARY_SIZEBinary overhead.- See Also:
-
CONVERTER_TO_BINARY
A converter from Object to Binary format that uses the DefaultSerializer.- Since:
- Coherence 2.4
-
CONVERTER_FROM_BINARY
A converter from Binary to Object format, which uses the DefaultSerializer.- Since:
- Coherence 2.4
-
CONVERTER_STRIP_INTDECO
A pass-through Binary converter that removes an IntDecoration if present.- Since:
- Coherence 3.4
-
PROPERTY_CONFIG
The name of the system property that can be used to override the location of the ExternalizableHelper configuration file.The value of this property must be the name of a resource that contains an XML document with the structure defined in the /com/tangosol/util/ExternalizableHelper.xml configuration descriptor.
- See Also:
-
FORCE_RESOLVING_STREAMS
public static final boolean FORCE_RESOLVING_STREAMSOption: Always use a ResolvingObjectInputStream, even if a regular ObjectInputStream is available. -
USE_XMLBEAN_CLASS_CACHE
public static final boolean USE_XMLBEAN_CLASS_CACHEOption: Use an XmlBean class cache. -
XMLBEAN_CLASS_CACHE
Option: XmlBean class cache implementation. -
USE_POF_STREAMS
public static final boolean USE_POF_STREAMSOption: Use POF as the default serialization format. -
LAMBDA_SERIALIZATION
Option: Use eitherstatic
ordynamic
lambda serialization. -
s_streamfactory
Option: Configurable ObjectStreamFactory. -
CHUNK_THRESHOLD
public static final int CHUNK_THRESHOLDA threshold used to decide whether to perform deserialization using a chunking algorithm; default is greater than 128MB.- See Also:
-
CHUNK_SIZE
public static final int CHUNK_SIZEWhen using the chunking algorithm each chunk is constrained to 64MB by default.- See Also:
-
-
Constructor Details
-
ExternalizableHelper
public ExternalizableHelper()
-
-
Method Details
-
toByteArray
Write an object to a byte array.- Parameters:
o
- the object to write into a byte array- Returns:
- a byte array containing the serialized form of the passed object
- Throws:
WrapperException
- may contain an IOException
-
toByteArray
Write an object to a byte array using the specified Serializer.- Parameters:
o
- the object to write into a byte arrayserializer
- the Serializer to use- Returns:
- a byte array containing the serialized form of the passed object
- Throws:
WrapperException
- may contain an IOException
-
toByteArray
public static byte[] toByteArray(long l, byte[] ab) Convert a long to an 8-byte byte array.- Parameters:
l
- the long to convertab
- the byte array to populate or null if a new byte array should be created- Returns:
- an 8-byte byte array that represents the given long
- See Also:
-
toLong
public static long toLong(byte[] ab) Convert a byte array to a long.- Parameters:
ab
- the byte array to convert- Returns:
- a long based on the provided byte array
- See Also:
-
fromByteArray
Read an object from a byte array.- Parameters:
ab
- the byte array containing the object- Returns:
- the object deserialized from the byte array
- Throws:
WrapperException
- may contain an IOException
-
fromByteArray
Read an object from a byte array.- Parameters:
ab
- the byte array containing the objectloader
- the ClassLoader to use- Returns:
- the object deserialized from the byte array
- Throws:
WrapperException
- may contain an IOException
-
toBinary
Write an object into a Binary object.- Parameters:
o
- the object to write into a Binary object- Returns:
- a Binary object containing a serialized form of the passed object
- Throws:
WrapperException
- may contain an IOException
-
toBinary
Write an object into a Binary object using the specified Serializer.- Parameters:
o
- the object to write into a Binary objectserializer
- the Serializer to use- Returns:
- a Binary object containing a serialized form of the passed object
- Throws:
WrapperException
- may contain an IOException
-
toBinary
Write an object into a Binary object using the specified Serializer.- Parameters:
o
- the object to write into a Binary objectserializer
- the Serializer to usebuf
- the reusable WriteBuffer to serialize into; this buffer is not safe to reuse until the returned Binary has been disposed of- Returns:
- a Binary object containing a serialized form of the passed object
- Throws:
WrapperException
- may contain an IOException
-
fromBinary
Read an object from a Binary object.- Type Parameters:
T
- the class of the deserialized object- Parameters:
bin
- the Binary object containing the serialized object- Returns:
- the object deserialized from the Binary object
- Throws:
WrapperException
- may contain an IOException
-
fromBinary
Read an object from a Binary object.- Type Parameters:
T
- the class of the deserialized object- Parameters:
bin
- the Binary object containing the serialized objectloader
- the ClassLoader to use- Returns:
- the object deserialized from the Binary object
- Throws:
WrapperException
- may contain an IOException
-
fromBinary
Read an object from a Binary object using the specified Serializer.- Type Parameters:
T
- the class of the deserialized object- Parameters:
bin
- the Binary object containing the serialized objectserializer
- the Serializer to use- Returns:
- the object deserialized from the Binary object
- Throws:
WrapperException
- may contain an IOException
-
fromBinary
Read an object from a Binary object using the specified Serializer and expected class.- Type Parameters:
T
- the class of the deserialized object- Parameters:
bin
- the Binary object containing the serialized objectserializer
- the Serializer to useclazz
- deserialize object as an instance of this class- Returns:
- the object deserialized from the Binary object
- Throws:
RuntimeException
- may contain an IOException
-
fromBinary
public static <T> T fromBinary(Binary bin, Serializer serializer, Remote.Function<ReadBuffer.BufferInput, ReadBuffer.BufferInput> supplier) Read an object from a Binary object using the specified Serializer.- Type Parameters:
T
- the class of the deserialized object- Parameters:
bin
- the Binary object containing the serialized objectserializer
- the Serializer to usesupplier
- an optional Function that given a BufferInput returns either the same or another BufferInput- Returns:
- the object deserialized from the Binary object
- Throws:
RuntimeException
- may contain an IOException
-
fromBinary
public static <T> T fromBinary(Binary bin, Serializer serializer, Remote.Function<ReadBuffer.BufferInput, ReadBuffer.BufferInput> supplier, Class<T> clazz) Read an object from a Binary object using the specified Serializer and expected class.- Type Parameters:
T
- the class of the deserialized object- Parameters:
bin
- the Binary object containing the serialized objectserializer
- the Serializer to usesupplier
- an optional Function that given a BufferInput returns either the same or another BufferInputclazz
- deserialize object as an instance of this class- Returns:
- the object deserialized from the Binary object
- Throws:
RuntimeException
- may contain an IOException
-
ensureSerializer
Obtain a Serializer for the specified ClassLoader. This method is intended to provide configurable indirection for the serialization of application objects.- Parameters:
loader
- a ClassLoader- Returns:
- the Serializer to use with the specified ClassLoader
-
toLiteBinary
Write an ExternalizableLite object into a Binary object. Unlike thetoBinary
, this method only serializes the object's content and not the identity part. To reconstruct the object frm that binary you would instantiate and "read" it as follows:ExternalizableLite o = new MyLiteObject(); o.readExternal(bin.getBufferInput());
- Parameters:
o
- the ExternalizableLite object to write into a Binary object- Returns:
- a Binary object containing a serialized form of the passed object
- Throws:
WrapperException
- may contain an IOException
-
isVersionCompatible
public static boolean isVersionCompatible(DataInput in, int nMajor, int nMinor, int nMicro, int nPatchSet, int nPatch) Determine whether the sender of the content (the given DataInput) runs a version that supersedes (greater or equal to) the specified version.- Parameters:
in
- the DataInput to interrogatenMajor
- the major versionnMinor
- the minor versionnMicro
- the micro versionnPatchSet
- the patch set versionnPatch
- the patch version- Returns:
- true iff the sender's version is greater or equal to the specified one
- Throws:
IllegalArgumentException
- if the DataInput is not aVersionAwareBufferInput
-
isVersionCompatible
Determine whether the sender of the content (the given DataInput) runs a version that supersedes (greater or equal to) the specified version.- Parameters:
in
- the DataInput to interrogatenYear
- the year segment of the calendar based versionnMonth
- the month segment of the calendar based versionnPatch
- the patch segment of the calendar based version- Returns:
- true iff the sender's version is greater or equal to the specified one
- Throws:
IllegalArgumentException
- if the DataInput is not aVersionAwareBufferInput
-
isVersionCompatible
public static boolean isVersionCompatible(DataOutput out, int nMajor, int nMinor, int nMicro, int nPatchSet, int nPatch) Determine whether all the recipients of the content (the given DataOutput) run versions that supersede (greater or equal to) the specified version.- Parameters:
out
- the DataOutput to interrogatenMajor
- the major versionnMinor
- the minor versionnMicro
- the micro versionnPatchSet
- the patch set versionnPatch
- the patch version- Returns:
- true iff the sender's version is greater or equal to the specified one
- Throws:
IllegalArgumentException
- if the DataOutput is not aVersionAwareBufferOutput
-
isVersionCompatible
Determine whether all the recipients of the content (the given DataOutput) run versions that supersede (greater or equal to) the specified version.- Parameters:
out
- the DataOutput to interrogatenYear
- the year segment of the calendar based versionnMonth
- the month segment of the calendar based versionnPatch
- the patch segment of the calendar based version- Returns:
- true iff the sender's version is greater or equal to the specified one
- Throws:
IllegalArgumentException
- if the DataOutput is not aVersionAwareBufferOutput
-
readTrint
Read a signed three-byte integer value from a stream.- Parameters:
in
- DataInput stream to read from- Returns:
- a three-byte signed integer value as an int
- Throws:
IOException
- if an I/O exception occurs
-
readUnsignedTrint
Read an unsigned three-byte integer value from a stream.- Parameters:
in
- DataInput stream to read from- Returns:
- a three-byte unsigned integer value as an int
- Throws:
IOException
- if an I/O exception occurs
-
writeTrint
Write a three-byte integer value to a stream.- Parameters:
out
- DataOutput stream to write ton
- a three-byte integer value passed as an int- Throws:
IOException
- if an I/O exception occurs
-
writeTrint
Write a three-byte integer value to a stream.- Parameters:
out
- DataOutput stream to write tol
- a three-byte integer value passed as an long- Throws:
IOException
- if an I/O exception occurs
-
makeTrint
public static int makeTrint(long l) Convert a long integer to a trint.- Parameters:
l
- the long value to convert to a trint- Returns:
- the equivalent unsigned 3-byte integer value (a "trint")
-
readInt
Read an int that uses variable length storage in the buffer.- Parameters:
in
- a BufferInput to read from- Returns:
- an int value
- Throws:
IOException
- if an I/O exception occurs
-
readInt
Read an int that uses variable length storage in the stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- an int value
- Throws:
IOException
- if an I/O exception occurs
-
calculatePackedLength
public static int calculatePackedLength(int n) Calculate the number of bytes needed to store a packed integer using a variable-length format.The format differs from DataOutput in that DataOutput always uses a fixed-length 4-byte Big Endian binary format for int values. The "packed" format includes a sign bit (0x40) and a continuation bit (0x80) in the first byte, followed by the least 6 significant bits of the int value. Subsequent bytes (each appearing only if the previous byte had its continuation bit set) include a continuation bit (0x80) and the next least 7 significant bits of the int value. In this way, a 32-bit value is encoded into 1-5 bytes, depending on the magnitude of the int value being encoded.
- Parameters:
n
- the value to calculate the packed length of- Returns:
- the number of bytes needed to store the value
-
writeInt
Write an int to a buffer using a variable length of storage.- Parameters:
out
- a BufferOutput to write ton
- an int value to write- Throws:
IOException
- if an I/O exception occurs
-
writeInt
Write an int to a stream using a variable length of storage.- Parameters:
out
- a DataOutput stream to write ton
- an int value to write- Throws:
IOException
- if an I/O exception occurs
-
readIntArray2d
Read a 2-dimensional int-array from the stream.- Parameters:
in
- the input stream to read from- Returns:
- the 2-dimensional int-array
- Throws:
IOException
- if an I/O Exception occurs
-
writeIntArray2d
Write a 2-dimensional int-array to the stream- Parameters:
out
- the output stream to write toaai
- the 2-dimensional int-array to write- Throws:
IOException
- if an I/O Exception occursNullPointerException
- if the array is null
-
readLong
Read a long that uses variable length storage in the buffer.- Parameters:
in
- a DataInput stream to read from- Returns:
- a long value
- Throws:
IOException
- if an I/O exception occurs
-
readLong
Read a long that uses variable length storage in the stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- a long value
- Throws:
IOException
- if an I/O exception occurs
-
calculatePackedLength
public static int calculatePackedLength(long l) Calculate the number of bytes needed to store a packed long using a variable-length format.The format differs from DataOutput in that DataOutput always uses a fixed-length 8-byte Big Endian binary format for long values. The "packed" format includes a sign bit (0x40) and a continuation bit (0x80) in the first byte, followed by the least 6 significant bits of the long value. Subsequent bytes (each appearing only if the previous byte had its continuation bit set) include a continuation bit (0x80) and the next least 7 significant bits of the long value. In this way, a 64-bit value is encoded into 1-10 bytes, depending on the magnitude of the long value being encoded.
- Parameters:
l
- the long value to calculate the packed length of- Returns:
- the number of bytes needed to store the value
-
writeLong
Write a long to a buffer using a variable length of storage.- Parameters:
out
- a BufferOutput stream to write tol
- a long value to write- Throws:
IOException
- if an I/O exception occurs
-
writeLong
Write a long to a stream using a variable length of storage.- Parameters:
out
- a DataOutput stream to write tol
- a long value to write- Throws:
IOException
- if an I/O exception occurs
-
readBooleanArray
Read a packed boolean array.- Parameters:
in
- a DataInput stream to read from- Returns:
- a boolean array value
- Throws:
IOException
- if an I/O exception occurs
-
writeBooleanArray
Write a packed boolean array.- Parameters:
out
- a DataOutput stream to write toaf
- a boolean array value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readByteArray
Read a variable-length encoded byte array.- Parameters:
in
- a DataInput stream to read from- Returns:
- a byte array value
- Throws:
IOException
- if an I/O exception occurs
-
writeByteArray
Write a variable-length encoded byte array.- Parameters:
out
- a DataOutput stream to write toab
- a byte array value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readUTF
Read a variable-length encoded UTF packed String. The major difference between this implementation and DataInputStream is that this is not limited to 64KB String values.Note: This format changed in Coherence 3.0; previously the leading integer value was the number of characters, and currently it is the number of bytes as per the java.io package implementations.
- Parameters:
in
- a DataInput stream to read from- Returns:
- a String value
- Throws:
IOException
- if an I/O exception occurs
-
convertUTF
public static String convertUTF(byte[] ab, int of, int cb, char[] ach) throws UTFDataFormatException Convert binary UTF-8 encode data to a String. This method is a helper to allow various I/O implementations to share a single, efficient implementation.- Parameters:
ab
- an array of bytes containing UTF-8 encoded charactersof
- the offset into the array of the UTF-8 data to decodecb
- the binary length in the array of the UTF-8 data to decodeach
- a temp char array large enough to convert the UTF into- Returns:
- a String value
- Throws:
UTFDataFormatException
- if the UTF data is corrupt
-
writeUTF
Write a variable-length encoded UTF packed String. The major difference between this implementation and DataOutput stream is that this is not limited to 64KB String values.Note: This format changed in Coherence 3.0; previously the leading integer value was the number of characters, and currently it is the number of bytes as per the java.io package implementations.
- Parameters:
out
- a DataOutput stream to write tos
- a String value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readSafeUTF
Read a variable-length encoded UTF packed String in the buffer.- Parameters:
in
- a BufferInput to read from- Returns:
- a String value
- Throws:
IOException
- if an I/O exception occurs
-
readSafeUTF
Read a variable-length encoded UTF packed String. The major difference between this implementation and DataInputStream is that this is not limited to 64KB String values and allows null value.Note: This format changed in Coherence 3.0; previously the leading integer value was the number of characters, and currently it is the number of bytes as per the java.io package implementations.
- Parameters:
in
- a DataInput stream to read from- Returns:
- a String value (could be null)
- Throws:
IOException
- if an I/O exception occurs
-
writeSafeUTF
Write a variable-length encoded UTF packed String to the buffer.- Parameters:
out
- a BufferOutput to write tos
- a String value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
writeSafeUTF
Write a variable-length encoded UTF packed String. The major difference between this implementation and DataOutput stream is that this is not limited to 64KB String values and allows null value.Note: This format changed in Coherence 3.0; previously the leading integer value was the number of characters, and currently it is the number of bytes as per the java.io package implementations.
- Parameters:
out
- a DataOutput stream to write tos
- a String value to write (could be null)- Throws:
IOException
- if an I/O exception occurs
-
readStringArray
Read a String array.- Parameters:
in
- a DataInput stream to read from- Returns:
- a String array value
- Throws:
IOException
- if an I/O exception occurs
-
writeStringArray
Write a String array.- Parameters:
out
- a DataOutput stream to write toas
- a String array to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readBigInteger
Read a BigInteger from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- a BigInteger value
- Throws:
IOException
- if an I/O exception occurs
-
writeBigInteger
Write a BigInteger to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write tobigint
- a BigInteger value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readBigDecimal
Read a BigDecimal from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- a BigDecimal value
- Throws:
IOException
- if an I/O exception occurs
-
writeBigDecimal
Write a BigDecimal to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write todec
- a BigDecimal value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readDate
Read a Date from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- a Date value
- Throws:
IOException
- if an I/O exception occurs
-
writeDate
Write a Date to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write todate
- a Date value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readTime
Read a Time from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- a Time value
- Throws:
IOException
- if an I/O exception occurs
-
writeTime
Write a Time to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write totime
- a Time value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readTimestamp
Read a Timestamp from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- a Timestamp value
- Throws:
IOException
- if an I/O exception occurs
-
writeTimestamp
Write a Timestamp to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write todt
- a Timestamp value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readFloatArray
Read an array of float numbers from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- an array of floats
- Throws:
IOException
- if an I/O exception occurs
-
writeFloatArray
Write an array of float numbers to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write toafl
- an array of floats to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readDoubleArray
Read an array of double numbers from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- an array of doubles
- Throws:
IOException
- if an I/O exception occurs
-
writeDoubleArray
Write an array of double numbers to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write toad
- an array of doubles to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readMap
Read map content from a DataInput stream and update the specified map.This method reads entries from the stream and "puts" them into the specified map one-by-one using the "put" method.
- Parameters:
in
- a DataInput stream to read frommap
- a map to add the entries intoloader
- the ClassLoader to use- Returns:
- the number of read and inserted entries
- Throws:
IOException
- if an I/O exception occurs- See Also:
-
readMap
Read map content from a DataInput stream and update the specified map using the "putAll" method.While the method
readMap(DataInput, Map, ClassLoader)
reads entries from the stream and "puts" them into the specified map one-by-one, this method collects up to the "block" number of entries into a temporary map and then updates the passed in map using the "putAll" method.- Parameters:
in
- a DataInput stream to read frommap
- a map to add the entries intocBlock
- the maximum number of entries to read at onceloader
- the ClassLoader to use- Returns:
- the number of read and inserted entries
- Throws:
IOException
- if an I/O exception occurs
-
writeMap
Write map content to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write tomap
- the map to write- Throws:
IOException
- if an I/O exception occurs
-
readCollection
public static int readCollection(DataInput in, Collection collection, ClassLoader loader) throws IOException Read collection content from a DataInput stream and update the specified collection.This method reads elements from the stream and adds them into the specified collection one-by-one using the "add" method.
- Parameters:
in
- a DataInput stream to read fromcollection
- a collection to add the elements intoloader
- the ClassLoader to use- Returns:
- the number of read and inserted elements
- Throws:
IOException
- if an I/O exception occurs
-
writeCollection
Write collection content to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write tocollection
- the collection to write- Throws:
IOException
- if an I/O exception occurs
-
readXmlSerializable
Read an XmlSerializable object from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- an XmlSerializable value
- Throws:
IOException
- if an I/O exception occurs
-
readXmlSerializable
public static XmlSerializable readXmlSerializable(DataInput in, ClassLoader loader) throws IOException Read an XmlSerializable object from a DataInput stream.- Parameters:
in
- a DataInput stream to read fromloader
- the ClassLoader to use- Returns:
- an XmlSerializable value
- Throws:
IOException
- if an I/O exception occurs
-
writeXmlSerializable
Write an XmlSerializable object to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write too
- an XmlSerializable value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readExternalizableLite
Read an ExternalizableLite object from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- an ExternalizableLite value
- Throws:
IOException
- if an I/O exception occurs
-
readExternalizableLite
public static ExternalizableLite readExternalizableLite(DataInput in, ClassLoader loader) throws IOException Read an ExternalizableLite object from a DataInput stream.If the class of the object in the DataInput stream is an
ExternalizableLite
class annotated withExternalizableType
, use the specified serializer'sdeserialize method
to deserialize the object from the DataInput stream.- Parameters:
in
- a DataInput stream to read fromloader
- the ClassLoader to use- Returns:
- an ExternalizableLite value
- Throws:
IOException
- if an I/O exception occurs
-
validateLoadClass
Validate that the given class is permitted to be deserialized by consulting any associated ObjectInputFilters.- Parameters:
clz
- the class to be validatedin
- input context to use to validate if class is allowed to be loaded- Throws:
InvalidClassException
- if ObjectInputFilter associated within
rejects classclz
-
validateLoadArray
public static void validateLoadArray(Class clz, int cLength, DataInput in) throws InvalidClassException Validate that the given class and array length is permitted to be deserialized by consulting any associated ObjectInputFilters.- Parameters:
clz
- the array type to be validatedcLength
- the array length to be validatedin
- input context to use to validate if class is allowed to be loaded- Throws:
InvalidClassException
- if ObjectInputFilter associated within
rejects array length
-
writeExternalizableLite
Write an ExternalizableLite object to a DataOutput stream.If the class of parameter
o
is annotated withExternalizableType
, use the specified serializer'sserialize method
to writeo
into the DataOutput stream.- Parameters:
out
- a DataOutput stream to write too
- an ExternalizableLite value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readXmlBean
Read an XmlBean object from a DataInput stream.- Parameters:
in
- a DataInput stream to read fromloader
- the ClassLoader to use- Returns:
- an XmlBean value
- Throws:
IOException
- if an I/O exception occurs
-
writeXmlBean
Write an XmlBean object to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write tobean
- an XmlBean value to write- Throws:
IOException
- if an I/O exception occursNullPointerException
- if null value if passed
-
readSerializable
Read an object from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- a value object
- Throws:
IOException
- if an I/O exception occurs
-
readSerializable
Read an object from a DataInput stream.- Parameters:
in
- a DataInput stream to read fromloader
- the ClassLoader to use- Returns:
- a value object
- Throws:
IOException
- if an I/O exception occurs
-
writeSerializable
Write an object to a DataOutput stream.- Parameters:
out
- a DataOutput stream to write too
- a value object to write- Throws:
IOException
- if an I/O exception occurs
-
readObject
Read an Object from the passed DataInput object.- Type Parameters:
T
- the class of the object read- Parameters:
in
- the DataInput stream to read an object from- Returns:
- the object read from the DataInput; may be null
- Throws:
IOException
- if an I/O exception occurs
-
readObject
Read an Object from the passed DataInput object.- Type Parameters:
T
- the class of the object read- Parameters:
in
- the DataInput stream to read an object fromloader
- the ClassLoader to use- Returns:
- the object read from the DataInput; may be null
- Throws:
IOException
- if an I/O exception occurs
-
writeObject
Write the specified data to the passed DataOutput object.- Parameters:
out
- the DataOutput stream to write too
- the data to write to the DataOutput; may be null- Throws:
IOException
- if an I/O exception occurs
-
validateBufferSize
public static void validateBufferSize(int cb) Verify that the requested buffer size is smaller than the configured maximum.- Parameters:
cb
- size of the buffer being requested- Throws:
BufferOverflowException
- if cb >MAX_BUFFER
-
getDeltaCompressor
Return a DeltaCompressor suitable for compressing/extracting binaries produced by ExternalizableHelper using the specified serializer. The returned DeltaCompressor will use the specified compressor to compress/extract binaries in the format produced directly by the specified serializer.- Parameters:
serializer
- the serializer whose produced binary format is consumed by the specified compressorcompressor
- the compressor- Returns:
- a DeltaCompressor
-
loadClass
public static Class loadClass(String sClass, ClassLoader loader1, ClassLoader loader2) throws ClassNotFoundException Attempt to load the specified class using sequentionally all of the specified loaders, the ContextClassLoader and the current class loader.- Parameters:
sClass
- the class nameloader1
- first ClassLoader to tryloader2
- second ClassLoader to try- Returns:
- the Class for the specified name
- Throws:
ClassNotFoundException
- if all the attempts fail
-
loadResource
Attempt to find a valid, resolvable URL for the specified resource, first by using each of the specified ClassLoaders, then using the ContextClassLoader.- Parameters:
sName
- the resource nameloader1
- first ClassLoader to tryloader2
- second ClassLoader to try- Returns:
- the URL for the specified resource name, or null if the resource could not be found
-
getInputStream
Get an InputStream for the passed DataInput object.- Parameters:
in
- an Object implementing the DataInput interface- Returns:
- an Object of type InputStream
-
getOutputStream
Get an OutputStream for the passed DataOutput object.- Parameters:
out
- an Object implementing the DataOutput interface- Returns:
- an Object of type OutputStream
-
getShieldedOutputStream
Get a shielded OutputStream for the passed OutputStream object.- Parameters:
out
- an OutputStream- Returns:
- an OutputStream that implements the Shielded interface
-
getObjectInput
Get an ObjectInput for the passed DataInput object.- Parameters:
in
- an Object implementing the DataInput interfaceloader
- the ClassLoader to use- Returns:
- an Object of type ObjectInput
- Throws:
IOException
- if an I/O exception occurs
-
getNewObjectInput
Get a new ObjectInput for the passed DataInput, even if the passed DataInput is an ObjectInput.- Parameters:
in
- an Object implementing the DataInput interfaceloader
- the ClassLoader to use- Returns:
- an Object of type ObjectInput that is guaranteed not to be
the same reference as
in
- Throws:
IOException
- if an I/O exception occurs
-
getObjectOutput
Get an ObjectOutput for the passed DataOutput object.- Parameters:
out
- an Object implementing the DataOutput interface- Returns:
- an Object of type ObjectOutput
- Throws:
IOException
- if an I/O exception occurs
-
isResolving
Determine whether the passed DataOutput handles ClassLoader resolving. Note that the ClassLoader resolving on the "write" side is necessary only to make the stream format symetrical for the "read" side.- Parameters:
out
- an object implementing DataOutput- Returns:
- true if the object implementing DataOutput also implements ObjectOutput and handles ClassLoader resolving
-
getObjectStreamFactory
Return the ObjectStreamFactory used to convert DataInput/Output into ObjectInput/Output streams.- Returns:
- the currently used ObjectStreamFactory
-
setObjectStreamFactory
Specify an ObjectStreamFactory that should be used to convert DataInput/Output into ObjectInput/Output streams.Warning: This facility should be used with extreme care; failure to set the ObjectStreamFactory identically on all cluster nodes may render some of all clustered services completely inoperable,
- Parameters:
factory
- the ObjectStreamFactory to use
-
isSerializable
Determine if the resource object can be serialized using the DefaultSerializer.- Parameters:
o
- the resource object- Returns:
- true iff the resource object can be serialized by the DefaultSerializer
-
getStreamFormat
Internal: Select an optimal stream format to use to store the passed object in a stream (as used by the DefaultSerializer).- Parameters:
o
- an Object- Returns:
- a stream format to use to store the object in a stream
-
isSerializerCompatible
Determines whether or not the specified serializers are compatible. In other words, this method returns true iff object serialized with the first Serializer can be deserialized by the second and visa versa.- Parameters:
serializerThis
- the first SerializerserializerThat
- the second Serializer- Returns:
- true iff the two Serializers are stream compatible
-
reportIncompatibleSerializers
public static void reportIncompatibleSerializers(NamedCache cache, String sService, Serializer serializer) Log the message explaining the serializer incompatibility between the specified cache and a service.- Parameters:
cache
- the NamedCache referencesService
- the service nameserializer
- the serializer used by the service
-
isDecorated
If the ReadBuffer is the result of serialization by ExternalizableHelper, determine if the buffer contains decorations.Note: This method can only be used against ReadBuffers that result from serialization by ExternalizableHelper or buffers that are already decorated.
- Parameters:
buf
- the ReadBuffer to check- Returns:
- true iff the ReadBuffer is decorated
-
isDecorated
If the ReadBuffer is the result of serialization by ExternalizableHelper, determine if the buffer contains the specified decoration.Note: This method can only be used against ReadBuffers that result from serialization by ExternalizableHelper or buffers that are already decorated.
- Parameters:
buf
- the ReadBuffer to checknId
- the identifier for the decoration to check- Returns:
- true iff the ReadBuffer is decorated with the specified decoration
-
decorate
Decorate the passed value with the specified decoration and return the resulting Binary. The passed value may or may not already be decorated.The decoration id must be in range defined by
DECO_ID_MIN
andDECO_ID_MAX
. A series of DECO_* constants are defined for the pre-approved decorations, including:DECO_VALUE
stores the original, undecorated value;DECO_EXPIRY
,DECO_STORE
,DECO_TX
andDECO_PUSHREP
are used by various facilities of Coherence andDECO_WLS
are assigned to Oracle products;DECO_APP_1
,DECO_APP_2
andDECO_APP_3
are made available for use by application developers;DECO_CUSTOM
is another application-definable decoration, but one that has also been used by Oracle frameworks and products in the past, which means that a potential exists for collisions.
All other potential decoration id values are reserved. Product and framework developers that require a new decoration id to be assigned to them should contact the Coherence product development team.
Note: This method can only be used against Binary values that result from serialization by ExternalizableHelper or Binary values that are already decorated.
- Parameters:
bin
- the Binary to decorate, which may already be decoratednId
- the identifier for the decoration, one of the DECO_* constantsbinDecoration
- the decoration to apply; a null value will remove the specified decoration- Returns:
- a decorated Binary containing the passed decoration
-
decorate
Decorate the passed value with the specified decoration and return the resulting ReadBuffer. The passed value may or may not already be decorated.The decoration id must be in range defined by
DECO_ID_MIN
andDECO_ID_MAX
. A series of DECO_* constants are defined for the pre-approved decorations, including:DECO_VALUE
stores the original, undecorated value;DECO_EXPIRY
,DECO_STORE
,DECO_TX
andDECO_PUSHREP
are used by various facilities of Coherence;-
DECO_WLS
are assigned to Oracle products; DECO_APP_1
,DECO_APP_2
andDECO_APP_3
are made available for use by application developers;DECO_CUSTOM
is another application-definable decoration, but one that has also been used by Oracle frameworks and products in the past, which means that a potential exists for collisions.
All other potential decoration id values are reserved. Product and framework developers that require a new decoration id to be assigned to them should contact the Coherence product development team.
Note: This method can only be used against ReadBuffers that result from serialization by ExternalizableHelper or buffers that are already decorated.
- Parameters:
bufOrig
- the ReadBuffer to decorate, which may already be decoratednId
- the identifier for the decoration, one of the DECO_* constantsbufDeco
- the decoration to apply; a null value will remove the specified decoration- Returns:
- a decorated ReadBuffer containing the passed decoration
-
decorate
Deprecated.as of Coherence 3.7.2Decorate the passed Binary with the passed decorations. If the passed Binary is decorated, use its decorations as the defaults and the passed decorations as the overrides; if the passed Binary is not decorated, then use it as the default for the"value"
decoration.Note: This method can only be used against Binary values that result from serialization by ExternalizableHelper or Binary values that are already decorated.
- Parameters:
bin
- the Binary to decorate, which may already be decorated; may be nullabinDecorations
- the decorations to apply; each non-null element is assumed to be a decoration to add whose identifier is its index in the array; the array contents will not be modified by this method- Returns:
- a decorated Binary containing the passed decorations
-
decorate
Decorate the passed Binary with the passed decorations. If the passed Binary is decorated, use its decorations as the defaults and the passed decorations as the overrides; if the passed Binary is not decorated, then use it as the default for the"value"
decoration.Note: This method can only be used against Binary values that result from serialization by ExternalizableHelper or Binary values that are already decorated.
- Parameters:
buf
- the Binary to decorate, which may already be decorated; may be nullabufDeco
- the decorations to apply; each non-null element is assumed to be a decoration to add whose identifier is its index in the array; the array contents will not be modified by this method- Returns:
- a decorated Binary containing the passed decorations
-
getDecoration
Deprecated.as of Coherence 3.7.2Extract and return the specified decoration from the passed Binary.Note: This method can only be used against Binary values that result from serialization by ExternalizableHelper or Binary values that are already decorated.
- Parameters:
bin
- the Binary that may be decoratednId
- the identifier for the decoration- Returns:
- the Binary decoration, or null if the passed Binary is not decorated or if no decoration was found for the specified identifier
-
getDecoration
Extract and return the specified decoration from the passed ReadBuffer.Note: This method can only be used against ReadBuffers that result from serialization by ExternalizableHelper or buffers that are already decorated.
- Parameters:
buf
- the ReadBuffer that may be decoratednId
- the identifier for the decoration- Returns:
- the decoration, or null if the passed ReadBuffer is not decorated or if no decoration was found for the specified identifier
-
getDecorations
Return an array containing all of the decorations from the passed ReadBuffer.If the passed value is not decorated, then the result is a single- element array containing the undecorated value, which is the DECO_VALUE decoration.
Note: This method can only be used against ReadBuffers that result from serialization by ExternalizableHelper or buffers that are already decorated.
- Parameters:
buf
- the ReadBuffer that may be decorated- Returns:
- an array of all decorations on the passed ReadBuffer, indexed by the DECO_* constants
-
undecorate
Deprecated.as of Coherence 3.7.2Remove the specified decoration from the passed Binary. If the resulting Binary has no decorations remaining, then return the undecorated Binary; otherwise return the decorated Binary with the remaining decorations.Note: This method can only be used against Binary values that result from serialization by ExternalizableHelper or Binary values that are already decorated.
- Parameters:
bin
- the Binary to undecoratenId
- the identifier for the decoration to remove- Returns:
- a Binary that may be decorated or undecorated
-
undecorate
Remove the specified decoration from the passed ReadBuffer and return the resulting contents (which may be undecorated, or contain the remaining decorations).Note: This method can only be used against ReadBuffers that result from serialization by ExternalizableHelper or buffers that are already decorated.
- Parameters:
buf
- the ReadBuffer to undecoratenId
- the identifier for the decoration to remove- Returns:
- a ReadBuffer that may or may not be decorated
-
getUndecorated
Deprecated.as of Coherence 3.7.2If the passed Binary is decorated, extract the original Binary value that the decorations were added to, otherwise return the passed Binary value.Note: This method can only be used against Binary values that result from serialization by ExternalizableHelper or Binary values that are already decorated.
- Parameters:
bin
- the Binary object- Returns:
- the undecorated Binary value, or null if the Binary value is decorated but does not contain an original Binary value
-
getUndecorated
If the passed ReadBuffer is decorated, extract the original contents that the decorations were added to, otherwise return the passed Binary value.Note: This method can only be used against ReadBuffers that result from serialization by ExternalizableHelper or buffers that are already decorated.
- Parameters:
buf
- the ReadBuffer object- Returns:
- the undecorated ReadBuffer, or null if the specified buffer is decorated but does not contain an actual value
-
asBinary
Return a Binary representing the contents of the specified ReadBuffer, or null if the buffer is null.- Parameters:
buf
- the read buffer- Returns:
- the contents of the read buffer as a Binary object, or null
-
replace
Potentially replaces specified argument with a different object before serialization.- Parameters:
o
- the object to replace, if necessary- Returns:
- the replacement object
- Throws:
ObjectStreamException
- if an error occurs
-
realize
Realizes object after deserialization by applying post-serialization rules.- Type Parameters:
T
- the class of realized object- Parameters:
o
- the object to realizeserializer
- the serializer that was used to deserialize the object- Returns:
- fully realized object
- Throws:
ObjectStreamException
- if an error occurs
-
main
Parse a hex string representing a serialized object.Example:
java com.tangosol.util.ExternalizableHelper 0x0603486921
- Parameters:
asArgs
- the hex string as the command line arguments
-
encodeExpiry
Return a ReadBuffer whose contents represent the specified buffer with the specified expiry encoded as a DECO_EXPIRY decoration. The encoded expiry can be decoded via thedecodeExpiry(com.tangosol.io.ReadBuffer)
method.- Parameters:
buf
- the buffer to encodeldtExpiry
- the expiry time, orCacheMap.EXPIRY_DEFAULT
orCacheMap.EXPIRY_NEVER
- Returns:
- an expiry-encoded ReadBuffer
-
decodeExpiry
Decode the expiry time from the specified ReadBuffer.- Parameters:
buf
- the buffer to decode- Returns:
- the decoded expiry, or
CacheMap.EXPIRY_DEFAULT
if none exists
-
decorate
Decorate the specified value with the specified integer decoration.- Parameters:
oValue
- the value to be decoratednDecoration
- the integer decoration- Returns:
- the decorated object
-
decorateBinary
Decorate the specified ReadBuffer with the specified integer decoration.- Parameters:
bufValue
- the ReadBuffer to be decoratednDecoration
- the integer decoration- Returns:
- the decorated (with integer decoration) ReadBuffer
-
isIntDecorated
Deprecated.useisIntDecorated(ByteSequence)
insteadCheck whether or not the specified ReadBuffer is a representation of an IntDecoratedObject.- Parameters:
buf
- the ReadBuffer- Returns:
- true iff the buffer contains (starts with) a representation of an IntDecoratedObject
-
isIntDecorated
Check whether or not the specified ByteSequence is a representation of an IntDecoratedObject.- Parameters:
buf
- the ByteSequence- Returns:
- true iff the buffer contains (starts with) a representation of an IntDecoratedObject
-
extractIntDecoration
Extract a decoration value from the specified ReadBuffer that contains a representation of an IntDecoratedObject.- Parameters:
buf
- the ReadBuffer- Returns:
- the integer decoration value
-
removeIntDecoration
Deprecated.as of Coherence 3.7.2Remove a decoration value from the specified Binary that contains a representation of an IntDecoratedObject.- Parameters:
bin
- the Binary object- Returns:
- the undecorated Binary value
-
removeIntDecoration
Remove a decoration value from the specified ReadBuffer that contains a representation of an IntDecoratedObject.- Parameters:
buf
- the ReadBuffer- Returns:
- the undecorated ReadBuffer
-
readCharArray
Read a char array.- Parameters:
in
- a DataInput stream to read from- Returns:
- a char array value
- Throws:
IOException
- if an I/O exception occurs
-
readLongArray
Read an array of long numbers from a DataInput stream that use fixed-length 8-byte Big Endian binary format.- Parameters:
in
- a DataInput stream to read from- Returns:
- an array of longs
- Throws:
IOException
- if an I/O exception occurs
-
readIntArray
Read an array of int numbers from a DataInput stream which use fixed-length 4-byte Big Endian binary format.- Parameters:
in
- a DataInput stream to read from- Returns:
- an array of ints
- Throws:
IOException
- if an I/O exception occurs
-
readObjectArray
Read an array of object from a DataInput stream.- Parameters:
in
- a DataInput stream to read from- Returns:
- an array of object
- Throws:
IOException
- if an I/O exception occurs
-
checkObjectInputFilter
Return true if the provided class is allowed to be deserialized.- Parameters:
clz
- the class to be checkedois
- the ObjectInputStream- Returns:
- true if the provided class is allowed to be deserialized
-
checkObjectInputFilter
Return true if the provided class is allowed to be deserialized.- Parameters:
clz
- the class to be checkedin
- input context containing ObjectInputFilter- Returns:
- true if the provided class is allowed to be deserialized from
in
-
checkObjectInputFilter
Return true if the provided class is allowed to be deserialized.- Parameters:
clz
- the class to be checkedcLength
- array length to be checkedin
- input context containing ObjectInputFilter- Returns:
- true if the provided class is allowed to be deserialized from
in
-
getObjectInputFilter
Return ObjectInputFilter associated withDataInput
.- Parameters:
in
- DataInput that may or may not have a ObjectInputFilter associated with it- Returns:
- ObjectInputFilter associated with
in
or null when one does not exist
-
getConfigSerialFilter
Return the static JVM-wide serial filter ornull
if not configured.- Returns:
- ObjectInputFilter as an Object to enable working with Java versions before 9 or null if no filter has been configured.
-
getConfigSerialFilterFactory
Return the static JVM-wide serial filter factory.- Returns:
- deserialization filter factory for Java version 17 and greater, null otherwise.
-
readIntArray
Read an array of the specified number of int from a DataInput stream.- Parameters:
in
- a DataInput stream to read fromc
- length to read- Returns:
- an array of ints
- Throws:
IOException
- if an I/O exception occurs
-
readLargeIntArray
Read an array of ints with length larger thanCHUNK_THRESHOLD
>> 2.- Parameters:
in
- a DataInput stream to read fromcLength
- length to read- Returns:
- an array of ints
- Throws:
IOException
- if an I/O exception occurs
-
readObjectArray
Read an array of the specified number of object from a DataInput stream.- Parameters:
in
- a DataInput stream to read fromcLength
- length to read- Returns:
- an array of objects
- Throws:
IOException
- if an I/O exception occurs
-
readLargeObjectArray
Read an array of objects with length larger thanCHUNK_THRESHOLD
>> 4.- Parameters:
in
- a DataInput stream to read fromcLength
- length to read- Returns:
- an array of objects
- Throws:
IOException
- if an I/O exception occurs
-
readLongArray
Read an array of the specified number of longs from a DataInput stream.- Parameters:
in
- a DataInput stream to read fromcLength
- length to read- Returns:
- an array of longs
- Throws:
IOException
- if an I/O exception occurs
-
readLargeLongArray
Read an array of longs with length larger thanCHUNK_THRESHOLD
>> 3.- Parameters:
in
- a DataInput stream to read fromcLength
- length to read- Returns:
- an array of longs
- Throws:
IOException
- if an I/O exception occurs
-
readCharArray
Read an array of char for the specified length from the reader.- Parameters:
reader
- the Utf8Reader to read fromcLength
- the length to read- Throws:
IOException
-
readLargeCharArray
Read an array of char for the specified length from the reader.- Parameters:
reader
- the Utf8Reader to read fromcLength
- the length to read- Throws:
IOException
-
readLargeByteArray
Read byte array with length larger thanCHUNK_THRESHOLD
.- Parameters:
in
- a DataInput stream to read fromcb
- number of bytes to read- Returns:
- a read byte array value
- Throws:
IOException
- if an I/O exception occurs
-
readBooleanArray
Read the specified number of booleans from a boolean array.- Parameters:
in
- a DataInput stream to read fromcLength
- the length to read- Returns:
- a boolean array value
- Throws:
IOException
- if an I/O exception occurs
-
readLargeBooleanArray
Read a boolean array with length larger thanCHUNK_THRESHOLD
.- Parameters:
in
- a DataInput stream to read fromcLength
- length to read- Returns:
- the read boolean array
- Throws:
IOException
- if an I/O exception occurs
-
readFloatArray
Read an array of the specified number of floats from a DataInput stream.- Parameters:
in
- a DataInput stream to read fromcfl
- the length to read- Returns:
- an array of floats
- Throws:
IOException
- if an I/O exception occurs
-
readLargeFloatArray
Read a float array with length larger thanCHUNK_THRESHOLD
>> 2.- Parameters:
in
- a DataInput stream to read fromcLength
- length to read- Returns:
- the read float array value
- Throws:
IOException
- if an I/O exception occurs
-
readDoubleArray
Read an array of the specified number of doubles from a DataInput stream.- Parameters:
in
- a DataInput stream to read fromcdfl
- length to read- Returns:
- an array of doubles
- Throws:
IOException
- if an I/O exception occurs
-
readLargeDoubleArray
Read a double array with length larger thanCHUNK_THRESHOLD
>> 3.- Parameters:
in
- a DataInput stream to read fromcLength
- the length to read- Returns:
- an array of doubles
- Throws:
IOException
- if an I/O exception occurs
-
readStringArray
Read array of string for the specified size.- Parameters:
in
- a DataInput stream to read fromc
- length to read- Returns:
- the read string array value
- Throws:
IOException
- if an I/O exception occurs
-
readLargeStringArray
Read array of string with length larger than thresholdCHUNK_THRESHOLD
>> 3.- Parameters:
in
- a DataInput stream to read fromc
- length to read- Returns:
- the read string array value
- Throws:
IOException
- if an I/O exception occurs
-
getClass
Return class for the specified class name; null if not found.- Parameters:
sClass
- the class name- Returns:
- the class for the specified class name
-