annotate src/myVncClient/MemInStream.java @ 90:7a1e934144e6

modify RFB Protocol version 3.855.
author e085711
date Tue, 20 Sep 2011 13:42:01 +0900
parents f9ecb0315303
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17
f9ecb0315303 add package
e085711
parents: 0
diff changeset
1 package myVncClient;
0
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
2 /* Copyright (C) 2002-2005 RealVNC Ltd. All Rights Reserved.
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
3 *
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
4 * This is free software; you can redistribute it and/or modify
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
7 * (at your option) any later version.
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
8 *
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
9 * This software is distributed in the hope that it will be useful,
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
12 * GNU General Public License for more details.
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
13 *
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
15 * along with this software; if not, write to the Free Software
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
16 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
17 * USA.
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
18 */
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
19
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
20 public class MemInStream extends InStream {
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
21
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
22 public MemInStream(byte[] data, int offset, int len) {
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
23 b = data;
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
24 ptr = offset;
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
25 end = offset + len;
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
26 }
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
27
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
28 public int pos() { return ptr; }
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
29
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
30 protected int overrun(int itemSize, int nItems) throws Exception {
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
31 throw new Exception("MemInStream overrun: end of stream");
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
32 }
e04119c40b9b upload all file of tighVNCClient
e085711
parents:
diff changeset
33 }