ObjectDecoderInputStream Class — netty Architecture
Architecture documentation for the ObjectDecoderInputStream class in ObjectDecoderInputStream.java from the netty codebase.
Entity Profile
Dependency Diagram
graph TD dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3["ObjectDecoderInputStream"] a1c82da6_d3c6_e0cc_056a_7b6b0b1dad30["ObjectDecoderInputStream.java"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|defined in| a1c82da6_d3c6_e0cc_056a_7b6b0b1dad30 9eee34c2_49a2_d42e_cd33_207dc410706b["ObjectDecoderInputStream()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| 9eee34c2_49a2_d42e_cd33_207dc410706b 430d998b_b994_4aa6_b0d8_bf0f0837254b["Object()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| 430d998b_b994_4aa6_b0d8_bf0f0837254b b089f686_2268_f385_4195_9f03265b5bb2["available()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| b089f686_2268_f385_4195_9f03265b5bb2 b4bcce04_124d_c6a3_fee2_c8064d040d45["close()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| b4bcce04_124d_c6a3_fee2_c8064d040d45 714a65d2_3d09_5382_0ce5_e8060b5bd025["mark()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| 714a65d2_3d09_5382_0ce5_e8060b5bd025 d496a854_4cbb_6c83_05d9_28c9e7e725cf["markSupported()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| d496a854_4cbb_6c83_05d9_28c9e7e725cf f5fb5d88_b531_6899_e125_fa5f25723060["read()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| f5fb5d88_b531_6899_e125_fa5f25723060 e571ea3f_b64a_952f_0a3b_80492ec46b00["readBoolean()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| e571ea3f_b64a_952f_0a3b_80492ec46b00 47eaee60_117c_9fb5_b697_85226f2d2d27["readByte()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| 47eaee60_117c_9fb5_b697_85226f2d2d27 254db801_101c_a00b_93ce_5fef39484d64["readChar()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| 254db801_101c_a00b_93ce_5fef39484d64 da70abc2_5059_cb26_a9cc_0002c8e17680["readDouble()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| da70abc2_5059_cb26_a9cc_0002c8e17680 513cd20c_305e_ba68_bf16_00d25ff91983["readFloat()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| 513cd20c_305e_ba68_bf16_00d25ff91983 a9ab03ed_9a34_0d61_9ee2_08e28e1a0822["readFully()"] dd8b5489_bf8f_1c4d_4ec2_e67ee00574b3 -->|method| a9ab03ed_9a34_0d61_9ee2_08e28e1a0822
Relationship Graph
Source Code
codec-base/src/main/java/io/netty/handler/codec/serialization/ObjectDecoderInputStream.java lines 41–255
@Deprecated
public class ObjectDecoderInputStream extends InputStream implements
ObjectInput {
private final DataInputStream in;
private final int maxObjectSize;
private final ClassResolver classResolver;
/**
* Creates a new {@link ObjectInput}.
*
* @param in
* the {@link InputStream} where the serialized form will be
* read from
*/
public ObjectDecoderInputStream(InputStream in) {
this(in, null);
}
/**
* Creates a new {@link ObjectInput}.
*
* @param in
* the {@link InputStream} where the serialized form will be
* read from
* @param classLoader
* the {@link ClassLoader} which will load the class of the
* serialized object
*/
public ObjectDecoderInputStream(InputStream in, ClassLoader classLoader) {
this(in, classLoader, 1048576);
}
/**
* Creates a new {@link ObjectInput}.
*
* @param in
* the {@link InputStream} where the serialized form will be
* read from
* @param maxObjectSize
* the maximum byte length of the serialized object. if the length
* of the received object is greater than this value,
* a {@link StreamCorruptedException} will be raised.
*/
public ObjectDecoderInputStream(InputStream in, int maxObjectSize) {
this(in, null, maxObjectSize);
}
/**
* Creates a new {@link ObjectInput}.
*
* @param in
* the {@link InputStream} where the serialized form will be
* read from
* @param classLoader
* the {@link ClassLoader} which will load the class of the
* serialized object
* @param maxObjectSize
* the maximum byte length of the serialized object. if the length
* of the received object is greater than this value,
* a {@link StreamCorruptedException} will be raised.
*/
public ObjectDecoderInputStream(InputStream in, ClassLoader classLoader, int maxObjectSize) {
ObjectUtil.checkNotNull(in, "in");
ObjectUtil.checkPositive(maxObjectSize, "maxObjectSize");
if (in instanceof DataInputStream) {
this.in = (DataInputStream) in;
} else {
this.in = new DataInputStream(in);
}
classResolver = ClassResolvers.weakCachingResolver(classLoader);
this.maxObjectSize = maxObjectSize;
}
@Override
public Object readObject() throws ClassNotFoundException, IOException {
int dataLen = readInt();
if (dataLen <= 0) {
throw new StreamCorruptedException("invalid data length: " + dataLen);
}
Defined In
Source
Frequently Asked Questions
What is the ObjectDecoderInputStream class?
ObjectDecoderInputStream is a class in the netty codebase, defined in codec-base/src/main/java/io/netty/handler/codec/serialization/ObjectDecoderInputStream.java.
Where is ObjectDecoderInputStream defined?
ObjectDecoderInputStream is defined in codec-base/src/main/java/io/netty/handler/codec/serialization/ObjectDecoderInputStream.java at line 41.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free