blob: 1588a905ee3c8563983cb292e60bb8d89fe9dfbe [file] [log] [blame]
enikey329d2412008-12-19 04:07:05 +00001package com.tightvnc.vncviewer;
2
enikey0ef32b22008-12-19 04:16:34 +00003import java.io.IOException;
4
enikeyaaa273f2008-12-19 04:20:42 +00005//
6// This class is layer between data of private RfbProto class
7// and classes in other packages.
8//
9// For now this class is used by com.tightvnc.decoder.RawDecoder
10//
enikey329d2412008-12-19 04:07:05 +000011public class RfbInputStream {
enikey1e3e9bf2008-12-19 04:13:32 +000012 RfbInputStream(RfbProto rfbProto) {
13 rfb = rfbProto;
14 }
enikey329d2412008-12-19 04:07:05 +000015
enikeyaaa273f2008-12-19 04:20:42 +000016 //
17 // Read data methods
18 //
19
enikey0ef32b22008-12-19 04:16:34 +000020 public void readFully(byte b[]) throws IOException {
21 readFully(b, 0, b.length);
22 }
23
24 public void readFully(byte b[], int off, int len) throws IOException {
25 rfb.readFully(b, off, len);
26 }
27
28 public int readU32() throws IOException {
29 return rfb.readU32();
30 }
31
32 public int readU8() throws IOException {
33 return rfb.readU8();
34 }
35
36 public int readCompactLen() throws IOException {
37 return rfb.readCompactLen();
38 }
39
enikey1e3e9bf2008-12-19 04:13:32 +000040 private RfbProto rfb = null;
41}