From: Scott M S. <st...@us...> - 2002-08-13 00:44:08
|
User: starksm Date: 02/08/12 17:44:08 Modified: src/main/org/jboss/invocation Tag: Branch_3_2 MarshalledValue.java Log: Add toByteArray() and size() methods Revision Changes Path No revision No revision 1.2.2.1 +12 -1 jboss/src/main/org/jboss/invocation/MarshalledValue.java Index: MarshalledValue.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/invocation/MarshalledValue.java,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -u -r1.2 -r1.2.2.1 --- MarshalledValue.java 9 May 2002 03:29:55 -0000 1.2 +++ MarshalledValue.java 13 Aug 2002 00:44:08 -0000 1.2.2.1 @@ -22,7 +22,7 @@ * not support class annotations and dynamic class loading. * * @author Sco...@jb... - * @version $Revision: 1.2 $ + * @version $Revision: 1.2.2.1 $ */ public class MarshalledValue implements java.io.Externalizable @@ -76,6 +76,17 @@ ByteArrayInputStream bais = new ByteArrayInputStream(serializedForm); MarshalledValueInputStream mvis = new MarshalledValueInputStream(bais); return mvis.readObject(); + } + + public byte[] toByteArray() + { + return serializedForm; + } + + public int size() + { + int size = serializedForm != null ? serializedForm.length : 0; + return size; } /** |