[jboss-jira] [JBoss JIRA] (JGRP-1771) Replace Exposed{Input, Output}Stream with ByteArray{Input, Output}Stream
Bela Ban (JIRA)
issues at jboss.org
Fri Jan 17 06:13:33 EST 2014
Bela Ban created JGRP-1771:
------------------------------
Summary: Replace Exposed{Input,Output}Stream with ByteArray{Input,Output}Stream
Key: JGRP-1771
URL: https://issues.jboss.org/browse/JGRP-1771
Project: JGroups
Issue Type: Enhancement
Reporter: Bela Ban
Assignee: Bela Ban
Fix For: 3.5
Currently, when reading a message, we create an ExposedByteArrayInputStream and a DataInputStream on top of it. Then we read the message or message list off of the DataInputStream.
The problem is that DataInputStream creates an 80 byte buffer for every creation.
Same thing for sending a message or message list.
SOLUTION:
* Create a ByteArrayInputStream which implements DataInput and works by reading from the passed in byte array
** Eventually, when switching to NIO.2, use a ByteBufferInputStream which works off of NIO ByteBuffers instead of byte arrays
*** Possibly replace readFrom(DataInput) with readFrom(Buffer) where Buffer implements reading from an NIO ByteBuffer (and possibly also from a simple byte array). Ditto for sending.
* Similar solution for sending of messages / message lists
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list