01: package sisc.io.custom;
02:
03: import java.io.Reader;
04:
05: import sisc.data.SchemeCharacterInputPort;
06: import sisc.data.Value;
07:
08: public class CustomCharacterInputPort extends SchemeCharacterInputPort
09: implements CustomPort {
10:
11: protected SchemeReader schemeReader;
12:
13: public CustomCharacterInputPort(Reader r, SchemeReader schemeReader) {
14: super (r);
15: this .schemeReader = schemeReader;
16: schemeReader.setHost(this );
17: }
18:
19: protected Value portLocal = VOID;
20:
21: public void setPortLocal(Value local) {
22: portLocal = local;
23: }
24:
25: public Value getPortLocal() {
26: return portLocal;
27: }
28:
29: public CustomPortProxy getProxy() {
30: return schemeReader;
31: }
32: }
33: /*
34: * The contents of this file are subject to the Mozilla Public
35: * License Version 1.1 (the "License"); you may not use this file
36: * except in compliance with the License. You may obtain a copy of
37: * the License at http://www.mozilla.org/MPL/
38: *
39: * Software distributed under the License is distributed on an "AS
40: * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
41: * implied. See the License for the specific language governing
42: * rights and limitations under the License.
43: *
44: * The Original Code is the Second Interpreter of Scheme Code (SISC).
45: *
46: * The Initial Developer of the Original Code is Scott G. Miller.
47: * Portions created by Scott G. Miller are Copyright (C) 2000-2007
48: * Scott G. Miller. All Rights Reserved.
49: *
50: * Contributor(s):
51: * Matthias Radestock
52: *
53: * Alternatively, the contents of this file may be used under the
54: * terms of the GNU General Public License Version 2 or later (the
55: * "GPL"), in which case the provisions of the GPL are applicable
56: * instead of those above. If you wish to allow use of your
57: * version of this file only under the terms of the GPL and not to
58: * allow others to use your version of this file under the MPL,
59: * indicate your decision by deleting the provisions above and
60: * replace them with the notice and other provisions required by
61: * the GPL. If you do not delete the provisions above, a recipient
62: * may use your version of this file under either the MPL or the
63: * GPL.
64: */
|