01: ///////////////////////////////////////////////////////////////////////////////
02: //
03: // Copyright (C) 2003-@year@ by Thomas M. Hazel, MyOODB (www.myoodb.org)
04: //
05: // All Rights Reserved
06: //
07: // This program is free software; you can redistribute it and/or modify
08: // it under the terms of the GNU General Public License and GNU Library
09: // General Public License as published by the Free Software Foundation;
10: // either version 2, or (at your option) any later version.
11: //
12: // This program is distributed in the hope that it will be useful,
13: // but WITHOUT ANY WARRANTY; without even the implied warranty of
14: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: // GNU General Public License and GNU Library General Public License
16: // for more details.
17: //
18: // You should have received a copy of the GNU General Public License
19: // and GNU Library General Public License along with this program; if
20: // not, write to the Free Software Foundation, 675 Mass Ave, Cambridge,
21: // MA 02139, USA.
22: //
23: ///////////////////////////////////////////////////////////////////////////////
24:
25: package org.rdesktop.objects;
26:
27: public interface StreamExchange extends
28: org.myoodb.collectable.Collectable {
29: @org.myoodb.MyOodbIndex(value=1)
30: public void open(String host, int port) throws java.io.IOException,
31: java.net.UnknownHostException;
32:
33: @org.myoodb.MyOodbIndex(value=2)
34: public String getHost();
35:
36: @org.myoodb.MyOodbIndex(value=3)
37: public int getPort();
38:
39: @org.myoodb.MyOodbIndex(value=4)
40: public void close() throws java.io.IOException;
41:
42: @org.myoodb.MyOodbIndex(value=5)
43: public int available() throws java.io.IOException;
44:
45: @org.myoodb.MyOodbIndex(value=6)
46: public byte readByte() throws java.io.IOException;
47:
48: @org.myoodb.MyOodbIndex(value=7)
49: public byte[] readFully(int len) throws java.io.IOException;
50:
51: @org.myoodb.MyOodbIndex(value=8)
52: public byte[] readFully(byte[] b) throws java.io.IOException;
53:
54: @org.myoodb.MyOodbIndex(value=9)
55: public byte[] readFully(byte[] b, int off, int len)
56: throws java.io.IOException;
57:
58: @org.myoodb.MyOodbIndex(value=10)
59: public int readInt() throws java.io.IOException;
60:
61: @org.myoodb.MyOodbIndex(value=11)
62: public int readUnsignedByte() throws java.io.IOException;
63:
64: @org.myoodb.MyOodbIndex(value=12)
65: public int readUnsignedShort() throws java.io.IOException;
66:
67: @org.myoodb.MyOodbIndex(value=13)
68: public int skipBytes(int n) throws java.io.IOException;
69:
70: @org.myoodb.MyOodbIndex(value=14)
71: public void write(byte[] b) throws java.io.IOException;
72:
73: @org.myoodb.MyOodbIndex(value=15)
74: public void write(byte[] b, int off, int len)
75: throws java.io.IOException;
76:
77: @org.myoodb.MyOodbIndex(value=16)
78: public void write(int b) throws java.io.IOException;
79: }
|