[jboss-cvs] JBoss Messaging SVN: r4825 - in branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting: impl and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Aug 18 09:11:27 EDT 2008
Author: ataylor
Date: 2008-08-18 09:11:27 -0400 (Mon, 18 Aug 2008)
New Revision: 4825
Modified:
branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/Packet.java
branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/EncoderImpl.java
Log:
more tidying up
Modified: branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/Packet.java
===================================================================
--- branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/Packet.java 2008-08-18 13:04:21 UTC (rev 4824)
+++ branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/Packet.java 2008-08-18 13:11:27 UTC (rev 4825)
@@ -129,9 +129,7 @@
void putBuffer(MessagingBuffer body);
- void transferRemainingBuffer(Encoder buffer, int len);
+ void transferRemainingBuffer(Encoder buffer, int len);
void addBuffer(MessagingBuffer buffer, int packetLength);
-
- List<MessagingBuffer> getBodyType();
}
Modified: branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/EncoderImpl.java
===================================================================
--- branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/EncoderImpl.java 2008-08-18 13:04:21 UTC (rev 4824)
+++ branches/Branch_Message_Chunking_new/src/main/org/jboss/messaging/core/remoting/impl/EncoderImpl.java 2008-08-18 13:11:27 UTC (rev 4825)
@@ -462,10 +462,6 @@
{
buffer.putBuffer(buffers.remove(bufferPos + 1));
}
- /*for(int i = bufferPos + 1; i < buffers.size(); i++)
- {
- buffer.putBuffer(buffers.get(i));
- }*/
}
private void checkReadSpace(int size)
@@ -510,32 +506,4 @@
{
return buffersSizes.get(bufferPos);
}
-
- public List<MessagingBuffer> getBodyType()
- {
- int bodyLength = getInt();
- //if we are part way thru a buffer it must we need to copy into new buffer
- if(getCurrentBuffer().position() - org.jboss.messaging.util.DataConstants.SIZE_INT != getCurrentBuffersSize())
- {
- MessagingBuffer body = getCurrentBuffer().createNewBuffer(bodyLength);
- byte[] bytes = new byte[bodyLength];
- getCurrentBuffer().getBytes(bytes);
- body.putBytes(bytes);
- List<MessagingBuffer> theBody = new ArrayList<MessagingBuffer>();
- theBody.add(body);
- return theBody;
- }
- //else we just return the remaining buffers
- else
- {
- List<MessagingBuffer> theBody = new ArrayList<MessagingBuffer>();
- for(int i = bufferPos; i < buffers.size(); i++)
- {
- theBody.add(buffers.get(i));
- bufferPos++;
- }
- bufferPos++;
- return theBody;
- }
- }
}
More information about the jboss-cvs-commits
mailing list