openamf/src/java/org/openamf/io AMFSerializer.java,1.28,1.29
| Newsgroups | gmane.comp.java.openamf.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/openamf/openamf/src/java/org/openamf/io
In directory sc8-pr-cvs1:/tmp/cvs-serv31058/src/java/org/openamf/io
Modified Files:
AMFSerializer.java
Log Message:
fixed bug caused by ealier commit, now multiple bodies should be supported
Index: AMFSerializer.java
===================================================================
RCS file: /cvsroot/openamf/openamf/src/java/org/openamf/io/AMFSerializer.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** AMFSerializer.java 24 May 2003 01:06:59 -0000 1.28
--- AMFSerializer.java 24 May 2003 06:43:21 -0000 1.29
***************
*** 18,22 ****
import org.apache.commons.logging.LogFactory;
import org.openamf.AMFBody;
- import org.openamf.AMFMessage;
import org.openamf.ASObject;
import org.openamf.recordset.ASRecordSet;
--- 18,21 ----
***************
*** 34,40 ****
private static final int MILLS_PER_HOUR = 60000;
- // Data
- protected AMFMessage message;
-
// The output stream
protected DataOutputStream outputStream;
--- 33,36 ----
***************
*** 44,78 ****
}
! public void serialize(AMFMessage message) throws IOException {
! this.message = message;
!
! // Write the version?
! //outputStream.writeShort(0);
!
! // Get the header count
! int count = message.getHeaderCount();
! // Write the header count
! outputStream.writeShort(count);
!
! // Now write the headers
! for (int i = 0; i < count; i++)
! writeHeader(i);
!
! count = message.getBodyCount();
! // Write the body count
! outputStream.writeShort(count);
!
! // Now write the bodies
! for (int i = 0; i < count; i++)
! writeBody(i);
! }
!
! public void writeHeader(int i) {
! // Write the headers to the output stream
! // Nothing for now
! }
!
! public void writeBody(int i) throws IOException {
! AMFBody body = message.getBodyAt(i);
outputStream.writeUTF(body.getTarget());
outputStream.writeUTF(body.getResponse());
--- 40,44 ----
}
! public void writeBody(AMFBody body) throws IOException {
outputStream.writeUTF(body.getTarget());
outputStream.writeUTF(body.getResponse());
-------------------------------------------------------
This SF.net email is sponsored by: ObjectStore.
If flattening out C++ or Java code to make your application fit in a
relational database is painful, don't do it! Check out ObjectStore.
Now part of Progress Software. http://www.objectstore.net/sourceforge