Mercurial > hg > Members > nobuyasu > tightVNCClient
changeset 6:b593d6ff5a46
create class MyRfbProto
author | e085711 |
---|---|
date | Fri, 15 Apr 2011 23:49:05 +0900 |
parents | bdb8d7c7d4d1 |
children | 94c9e7825be2 |
files | src/RfbProto.java src/VncViewer.java |
diffstat | 2 files changed, 8 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/RfbProto.java Fri Apr 15 18:31:12 2011 +0900 +++ b/src/RfbProto.java Fri Apr 15 23:49:05 2011 +0900 @@ -118,8 +118,11 @@ // Input stream is declared private to make sure it can be accessed // only via RfbProto methods. We have to do this because we want to // count how many bytes were read. - private DataInputStream is; - private long numBytesRead = 0; +// private DataInputStream is; + protected DataInputStream is; + +// private long numBytesRead = 0; + protected long numBytesRead = 0; public long getNumBytesRead() { return numBytesRead; @@ -167,7 +170,8 @@ CapsContainer encodingCaps; // If true, informs that the RFB socket was closed. - private boolean closed; +// private boolean closed; + protected boolean closed; // // Constructor. Make TCP connection to RFB server. @@ -1359,14 +1363,4 @@ numBytesRead += 4; return r; } - void mark(int len) throws IOException{ - is.mark(len); - } - void reset() throws IOException{ - is.reset(); - } - final boolean markSupported() { - return is.markSupported(); - } - }
--- a/src/VncViewer.java Fri Apr 15 18:31:12 2011 +0900 +++ b/src/VncViewer.java Fri Apr 15 23:49:05 2011 +0900 @@ -161,7 +161,7 @@ vncFrame.pack(); vncFrame.setVisible(true); try { - rfb = new RfbProto(host, port, this); + rfb = new MyRfbProto(host, port, this); rfb.framebufferWidth = 1680; rfb.framebufferHeight = 1050;