[Developement] VncCanvas class implements RecordInterface interface.

git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3410 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/java/src/com/tightvnc/vncviewer/VncCanvas.java b/java/src/com/tightvnc/vncviewer/VncCanvas.java
index d3a4070..ed8d979 100644
--- a/java/src/com/tightvnc/vncviewer/VncCanvas.java
+++ b/java/src/com/tightvnc/vncviewer/VncCanvas.java
@@ -36,7 +36,7 @@
 //
 
 class VncCanvas extends Canvas
-  implements KeyListener, MouseListener, MouseMotionListener {
+  implements KeyListener, MouseListener, MouseMotionListener, RecordInterface {
 
   VncViewer viewer;
   RfbProto rfb;
@@ -2137,4 +2137,44 @@
     }
   }
 
+  //
+  // 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);
+  }
 }