aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/src/main/java/com/trilead/ssh2/channel/ChannelOutputStream.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/src/main/java/com/trilead/ssh2/channel/ChannelOutputStream.java b/lib/src/main/java/com/trilead/ssh2/channel/ChannelOutputStream.java
index 3fd7214..30e8fd8 100644
--- a/lib/src/main/java/com/trilead/ssh2/channel/ChannelOutputStream.java
+++ b/lib/src/main/java/com/trilead/ssh2/channel/ChannelOutputStream.java
@@ -13,20 +13,21 @@ public final class ChannelOutputStream extends OutputStream
{
Channel c;
+ private byte[] writeBuffer;
+
boolean isClosed = false;
ChannelOutputStream(Channel c)
{
this.c = c;
+ writeBuffer = new byte[1];
}
public void write(int b) throws IOException
{
- byte[] buff = new byte[1];
-
- buff[0] = (byte) b;
+ writeBuffer[0] = (byte) b;
- write(buff, 0, 1);
+ write(writeBuffer, 0, 1);
}
public void close() throws IOException