From d15113234e0a7f9351ccc95b33b10975e80f325f Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 25 Jan 2005 15:59:48 +0000 Subject: [PATCH] Make the class Serializable instead of Externalizable. --- src/helma/framework/ResponseTrans.java | 45 ++------------------------ 1 file changed, 2 insertions(+), 43 deletions(-) diff --git a/src/helma/framework/ResponseTrans.java b/src/helma/framework/ResponseTrans.java index af71c0a9..98605b2e 100644 --- a/src/helma/framework/ResponseTrans.java +++ b/src/helma/framework/ResponseTrans.java @@ -26,7 +26,8 @@ import java.util.*; * A Transmitter for a response to the servlet client. Objects of this * class are directly exposed to JavaScript as global property res. */ -public final class ResponseTrans implements Externalizable { +public final class ResponseTrans implements Serializable { + static final long serialVersionUID = -8627370766119740844L; static final int INITIAL_BUFFER_SIZE = 2048; @@ -799,46 +800,4 @@ public final class ResponseTrans implements Externalizable { return c; } - /** - * - * - * @param s ... - * - * @throws ClassNotFoundException ... - * @throws IOException ... - */ - public void readExternal(ObjectInput s) throws ClassNotFoundException, IOException { - contentType = (String) s.readObject(); - response = (byte[]) s.readObject(); - redir = (String) s.readObject(); - cookies = (Map) s.readObject(); - cache = s.readBoolean(); - status = s.readInt(); - realm = (String) s.readObject(); - lastModified = s.readLong(); - notModified = s.readBoolean(); - charset = (String) s.readObject(); - etag = (String) s.readObject(); - } - - /** - * - * - * @param s ... - * - * @throws IOException ... - */ - public void writeExternal(ObjectOutput s) throws IOException { - s.writeObject(contentType); - s.writeObject(response); - s.writeObject(redir); - s.writeObject(cookies); - s.writeBoolean(cache); - s.writeInt(status); - s.writeObject(realm); - s.writeLong(lastModified); - s.writeBoolean(notModified); - s.writeObject(charset); - s.writeObject(etag); - } }