From a36ea0f3a4d9deacb0a49683f046db11559b5c6b Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Thu, 14 Jan 2010 12:15:04 +0000 Subject: [PATCH] Moved SwitchableInputStream and its test class to org.jboss.netty.handler.codec.serialization because it's used only there. --- .../codec/serialization/CompatibleObjectDecoder.java | 1 - .../codec/serialization}/SwitchableInputStream.java | 8 ++++---- .../codec/serialization}/SwitchableInputStreamTest.java | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) rename src/main/java/org/jboss/netty/{util/internal => handler/codec/serialization}/SwitchableInputStream.java (86%) rename src/test/java/org/jboss/netty/{util/internal => handler/codec/serialization}/SwitchableInputStreamTest.java (92%) diff --git a/src/main/java/org/jboss/netty/handler/codec/serialization/CompatibleObjectDecoder.java b/src/main/java/org/jboss/netty/handler/codec/serialization/CompatibleObjectDecoder.java index 33d6a799d1..51b59918c5 100644 --- a/src/main/java/org/jboss/netty/handler/codec/serialization/CompatibleObjectDecoder.java +++ b/src/main/java/org/jboss/netty/handler/codec/serialization/CompatibleObjectDecoder.java @@ -25,7 +25,6 @@ import org.jboss.netty.buffer.ChannelBufferInputStream; import org.jboss.netty.channel.Channel; import org.jboss.netty.channel.ChannelHandlerContext; import org.jboss.netty.handler.codec.replay.ReplayingDecoder; -import org.jboss.netty.util.internal.SwitchableInputStream; /** * A decoder which deserializes the received {@link ChannelBuffer}s into Java diff --git a/src/main/java/org/jboss/netty/util/internal/SwitchableInputStream.java b/src/main/java/org/jboss/netty/handler/codec/serialization/SwitchableInputStream.java similarity index 86% rename from src/main/java/org/jboss/netty/util/internal/SwitchableInputStream.java rename to src/main/java/org/jboss/netty/handler/codec/serialization/SwitchableInputStream.java index a583c57563..1fa9c282b1 100644 --- a/src/main/java/org/jboss/netty/util/internal/SwitchableInputStream.java +++ b/src/main/java/org/jboss/netty/handler/codec/serialization/SwitchableInputStream.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package org.jboss.netty.util.internal; +package org.jboss.netty.handler.codec.serialization; import java.io.FilterInputStream; import java.io.InputStream; @@ -28,13 +28,13 @@ import java.io.InputStream; * @version $Rev$, $Date$ * */ -public class SwitchableInputStream extends FilterInputStream { +final class SwitchableInputStream extends FilterInputStream { /** * Creates a new instance without initializing the reference to the * underlying stream. */ - public SwitchableInputStream() { + SwitchableInputStream() { super(null); } @@ -42,7 +42,7 @@ public class SwitchableInputStream extends FilterInputStream { * Creates a new instance with the initial reference to the underlying * stream. */ - public void switchStream(InputStream in) { + void switchStream(InputStream in) { this.in = in; } } diff --git a/src/test/java/org/jboss/netty/util/internal/SwitchableInputStreamTest.java b/src/test/java/org/jboss/netty/handler/codec/serialization/SwitchableInputStreamTest.java similarity index 92% rename from src/test/java/org/jboss/netty/util/internal/SwitchableInputStreamTest.java rename to src/test/java/org/jboss/netty/handler/codec/serialization/SwitchableInputStreamTest.java index 058ec97c79..24408d5eab 100644 --- a/src/test/java/org/jboss/netty/util/internal/SwitchableInputStreamTest.java +++ b/src/test/java/org/jboss/netty/handler/codec/serialization/SwitchableInputStreamTest.java @@ -13,7 +13,7 @@ * License for the specific language governing permissions and limitations * under the License. */ -package org.jboss.netty.util.internal; +package org.jboss.netty.handler.codec.serialization; import static org.easymock.EasyMock.*; import static org.easymock.classextension.EasyMock.*; @@ -21,6 +21,7 @@ import static org.junit.Assert.*; import java.io.InputStream; +import org.jboss.netty.handler.codec.serialization.SwitchableInputStream; import org.junit.Test;