Author: manik.surtani(a)jboss.com
Date: 2008-02-05 13:14:08 -0500 (Tue, 05 Feb 2008)
New Revision: 5295
Modified:
core/trunk/src/main/java/org/jboss/cache/marshall/io/ReusableObjectInputStream.java
Log:
Added object stream pooling for input streams as well
Modified:
core/trunk/src/main/java/org/jboss/cache/marshall/io/ReusableObjectInputStream.java
===================================================================
---
core/trunk/src/main/java/org/jboss/cache/marshall/io/ReusableObjectInputStream.java 2008-02-05
18:06:41 UTC (rev 5294)
+++
core/trunk/src/main/java/org/jboss/cache/marshall/io/ReusableObjectInputStream.java 2008-02-05
18:14:08 UTC (rev 5295)
@@ -17,14 +17,14 @@
*/
public class ReusableObjectInputStream extends MarshalledValueInputStream
{
- ReusableByteArrayInputStream bytes;
+ ResettableByteArrayInputStream bytes;
public ReusableObjectInputStream() throws IOException, SecurityException
{
- this(new ReusableByteArrayInputStream());
+ this(new ResettableByteArrayInputStream());
}
- protected ReusableObjectInputStream(ReusableByteArrayInputStream in) throws
IOException
+ protected ReusableObjectInputStream(ResettableByteArrayInputStream in) throws
IOException
{
super(in);
bytes = in;
@@ -56,7 +56,7 @@
/**
* A byte array input stream that can be reused (i.e., have it's byte array
re-initialised).
*/
- static class ReusableByteArrayInputStream extends ByteArrayInputStream
+ static class ResettableByteArrayInputStream extends ByteArrayInputStream
{
private final static byte[] INIT_BYTES = {(byte) ((STREAM_MAGIC >>> 8)
& 0xFF),
(byte) ((STREAM_MAGIC) & 0xFF),
@@ -67,7 +67,7 @@
/**
* Creates a new instance with a null byte buffer. Use {@link #init(byte[])} to
set the byte buffer to use.
*/
- ReusableByteArrayInputStream()
+ ResettableByteArrayInputStream()
{
super(INIT_BYTES);
}
Show replies by date