summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>2008-12-24 04:01:27 +0000
committerenikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519>2008-12-24 04:01:27 +0000
commit1cc0194565a73194bacea13f52dfed3b3cb57dcc (patch)
treea45a3edb7da1bc05e11c753c425ac7aa264c3645 /java
parent1622a3cda79682e3ee36a8b37852ea8ce3bdd4a2 (diff)
downloadtigervnc-1cc0194565a73194bacea13f52dfed3b3cb57dcc.tar.gz
tigervnc-1cc0194565a73194bacea13f52dfed3b3cb57dcc.zip
[BugFix] Added check to verify that data can be written to record output stream before writting.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3449 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java')
-rw-r--r--java/src/com/tightvnc/vncviewer/RecordOutputStream.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/java/src/com/tightvnc/vncviewer/RecordOutputStream.java b/java/src/com/tightvnc/vncviewer/RecordOutputStream.java
index 188695cc..a19384e5 100644
--- a/java/src/com/tightvnc/vncviewer/RecordOutputStream.java
+++ b/java/src/com/tightvnc/vncviewer/RecordOutputStream.java
@@ -10,15 +10,18 @@ public class RecordOutputStream implements DataOutput {
}
public void write(byte[] b) throws IOException {
- recordInterface.write(b);
+ if (recordInterface.canWrite())
+ recordInterface.write(b);
}
public void write(byte[] b, int off, int len) throws IOException {
- recordInterface.write(b, off, len);
+ if (recordInterface.canWrite())
+ recordInterface.write(b, off, len);
}
public void write(int b) throws IOException {
- recordInterface.writeIntBE(b);
+ if (recordInterface.canWrite())
+ recordInterface.writeIntBE(b);
}
public void writeBoolean(boolean v) { }