cvs commit: spice/sandbox/packet/src/java/org/realityforge/packet/encoder BasicEncoder.java
Peter Donald <[email protected]> Tue, 11 Nov 2003 03:38:33 -0800
| Newsgroups | gmane.comp.java.spice.cvs |
|---|---|
| Message-ID | <[email protected]> |
donaldp 03/11/11 03:38:33
Modified: sandbox/packet/src/java/org/realityforge/packet/encoder
BasicEncoder.java
Log:
Make sure position is reset if header not available
Revision Changes Path
1.4 +2 -1 spice/sandbox/packet/src/java/org/realityforge/packet/encoder/BasicEncoder.java
Index: BasicEncoder.java
===================================================================
RCS file: /cvsroot/spice/spice/sandbox/packet/src/java/org/realityforge/packet/encoder/BasicEncoder.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BasicEncoder.java 11 Nov 2003 11:24:22 -0000 1.3
+++ BasicEncoder.java 11 Nov 2003 11:38:33 -0000 1.4
@@ -14,7 +14,7 @@
* A basic encoder that writes packet using simple mechanisms.
*
* @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
- * @version $Revision: 1.3 $ $Date: 2003/11/11 11:24:22 $
+ * @version $Revision: 1.4 $ $Date: 2003/11/11 11:38:33 $
*/
public class BasicEncoder
implements Encoder
@@ -52,6 +52,7 @@
input.position( 0 );
if( input.remaining() < SIZEOF_HEADER )
{
+ input.position( index );
return null;
}
final short messageSize = input.getShort();
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/