diff options
author | enikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2008-12-19 04:37:09 +0000 |
---|---|---|
committer | enikey <enikey@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2008-12-19 04:37:09 +0000 |
commit | 418611feeee834673bbf004ad87bfcf09bf75f2b (patch) | |
tree | 6e75e6e007c22de26297a549ba949a583c5160ac /java/src/com | |
parent | 3d1d86a8e9465c36354ba17dbba7668b961e273d (diff) | |
download | tigervnc-418611feeee834673bbf004ad87bfcf09bf75f2b.tar.gz tigervnc-418611feeee834673bbf004ad87bfcf09bf75f2b.zip |
[Developement] VncCanvas class implements RecordInterface interface.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3410 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'java/src/com')
-rw-r--r-- | java/src/com/tightvnc/vncviewer/VncCanvas.java | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/java/src/com/tightvnc/vncviewer/VncCanvas.java b/java/src/com/tightvnc/vncviewer/VncCanvas.java index d3a40700..ed8d979b 100644 --- a/java/src/com/tightvnc/vncviewer/VncCanvas.java +++ b/java/src/com/tightvnc/vncviewer/VncCanvas.java @@ -36,7 +36,7 @@ import java.util.zip.*; // class VncCanvas extends Canvas - implements KeyListener, MouseListener, MouseMotionListener { + implements KeyListener, MouseListener, MouseMotionListener, RecordInterface { VncViewer viewer; RfbProto rfb; @@ -2137,4 +2137,44 @@ class VncCanvas extends Canvas } } + // + // Override RecordInterface methods + // + + public boolean isRecordFromBeginning() { + return rfb.recordFromBeginning; + } + + public boolean canWrite() { + // We can record if rec is not null + return rfb.rec != null; + } + + public void write(byte b[]) throws IOException { + rfb.rec.write(b); + } + + public void write(byte b[], int off, int len) throws IOException { + rfb.rec.write(b, off, len); + } + + public void writeByte(byte b) throws IOException { + rfb.rec.writeByte(b); + } + + public void writeByte(int i) throws IOException { + rfb.rec.writeByte(i); + } + + public void writeIntBE(int v) throws IOException { + rfb.rec.writeIntBE(v); + } + + public void recordCompactLen(int len) throws IOException { + rfb.recordCompactLen(len); + } + + public void recordCompressedData(byte[] data) throws IOException { + rfb.recordCompressedData(data); + } } |