ObjectInputFilter
public static interface ObjectInputFilter.FilterInfo
ObjectInputStream
.Modifier and Type | Method | Description |
---|---|---|
long |
arrayLength() |
The number of array elements when deserializing an array of the class. |
long |
depth() |
The current depth. |
long |
references() |
The current number of object references. |
Class |
serialClass() |
The class of an object being deserialized. |
long |
streamBytes() |
The current number of bytes consumed. |
Class<?> serialClass()
[[Ljava.lang.String;
". To check the array's element type, iteratively use Class.getComponentType
while the result is an array and then check the class. The serialClass is null
in the case where a new object is not being created and to give the filter a chance to check the depth, number of references to existing objects, and the stream size.long arrayLength()
long depth()
1
and increases for each nested object and decrements when each nested object returns.long references()
long streamBytes()
streamBytes
is implementation specific and may not be directly related to the object in the stream that caused the callback.
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/ObjectInputFilter.FilterInfo.html