annotate src/MemInStream.java @ 0:30bb7074acb1

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