public class AbcBytesSerializer extends Object implements ContextSerializer<byte[]>
| Constructor and Description |
|---|
AbcBytesSerializer() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bodyRequired() |
Class<byte[]> |
dataType() |
Object |
deserialize(byte[] data,
Type toType) |
Object |
deserializeFromBody(org.noear.solon.core.handle.Context ctx,
Type bodyType) |
static AbcBytesSerializer |
getInstance() |
boolean |
matched(org.noear.solon.core.handle.Context ctx,
String mime) |
String |
mimeType() |
String |
name()
序列化器名字
|
byte[] |
serialize(Object fromObj) |
void |
serializeToBody(org.noear.solon.core.handle.Context ctx,
Object data) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeserializeFromBodypublic static AbcBytesSerializer getInstance()
public String mimeType()
mimeType in interface org.noear.solon.core.serialize.Serializer<byte[]>mimeType in interface ContextSerializer<byte[]>public Class<byte[]> dataType()
dataType in interface org.noear.solon.core.serialize.Serializer<byte[]>public boolean bodyRequired()
bodyRequired in interface ContextSerializer<byte[]>public String name()
name in interface org.noear.solon.core.serialize.Serializer<byte[]>public byte[] serialize(Object fromObj) throws IOException
serialize in interface org.noear.solon.core.serialize.Serializer<byte[]>IOExceptionpublic Object deserialize(byte[] data, Type toType) throws IOException
deserialize in interface org.noear.solon.core.serialize.Serializer<byte[]>IOExceptionpublic boolean matched(org.noear.solon.core.handle.Context ctx,
String mime)
matched in interface ContextSerializer<byte[]>public void serializeToBody(org.noear.solon.core.handle.Context ctx,
Object data)
throws IOException
serializeToBody in interface ContextSerializer<byte[]>IOExceptionpublic Object deserializeFromBody(org.noear.solon.core.handle.Context ctx, @Nullable Type bodyType) throws IOException
deserializeFromBody in interface ContextSerializer<byte[]>IOExceptionCopyright © 2025. All rights reserved.