Skip to content

if serialized by encoding toString ISO-8859-1, how to unserialized  #41

@stevenxuwoss

Description

@stevenxuwoss

public static String serialize(Object obj) throws IOException {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream;
objectOutputStream = new ObjectOutputStream(byteArrayOutputStream);
objectOutputStream.writeObject(obj);
//String string = byteArrayOutputStream.toString();
String string = byteArrayOutputStream.toString("ISO-8859-1");
objectOutputStream.close();
byteArrayOutputStream.close();
return string;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions