63 |
*/ |
*/ |
64 |
public abstract class FilterReader extends Reader |
public abstract class FilterReader extends Reader |
65 |
{ |
{ |
|
/* |
|
|
* Instance Variables |
|
|
*/ |
|
|
|
|
66 |
/** |
/** |
67 |
* This is the subordinate <code>Reader</code> to which method calls |
* This is the subordinate <code>Reader</code> to which method calls |
68 |
* are redirected |
* are redirected |
69 |
*/ |
*/ |
70 |
protected Reader in; |
protected Reader in; |
71 |
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/* |
|
|
* Constructors |
|
|
*/ |
|
|
|
|
72 |
/** |
/** |
73 |
* Create a <code>FilterReader</code> with the specified subordinate |
* Create a <code>FilterReader</code> with the specified subordinate |
74 |
* <code>Reader</code>. |
* <code>Reader</code>. |
83 |
this.in = in; |
this.in = in; |
84 |
} |
} |
85 |
|
|
|
/*************************************************************************/ |
|
|
|
|
|
/* |
|
|
* Instance Methods |
|
|
*/ |
|
|
|
|
86 |
/** |
/** |
87 |
* Calls the <code>in.mark(int)</code> method. |
* Calls the <code>in.mark(int)</code> method. |
88 |
* |
* |
95 |
in.mark(readlimit); |
in.mark(readlimit); |
96 |
} |
} |
97 |
|
|
|
/*************************************************************************/ |
|
|
|
|
98 |
/** |
/** |
99 |
* Calls the <code>in.markSupported()</code> method. |
* Calls the <code>in.markSupported()</code> method. |
100 |
* |
* |
106 |
return(in.markSupported()); |
return(in.markSupported()); |
107 |
} |
} |
108 |
|
|
|
/*************************************************************************/ |
|
|
|
|
109 |
/** |
/** |
110 |
* Calls the <code>in.reset()</code> method. |
* Calls the <code>in.reset()</code> method. |
111 |
* |
* |
116 |
in.reset(); |
in.reset(); |
117 |
} |
} |
118 |
|
|
|
/*************************************************************************/ |
|
|
|
|
119 |
/** |
/** |
120 |
* Calls the <code>in.read()</code> method. |
* Calls the <code>in.read()</code> method. |
121 |
* |
* |
128 |
return(in.ready()); |
return(in.ready()); |
129 |
} |
} |
130 |
|
|
|
/*************************************************************************/ |
|
|
|
|
131 |
/** |
/** |
132 |
* Calls the <code>in.skip(long)</code> method |
* Calls the <code>in.skip(long)</code> method |
133 |
* |
* |
142 |
return(in.skip(num_chars)); |
return(in.skip(num_chars)); |
143 |
} |
} |
144 |
|
|
|
/*************************************************************************/ |
|
|
|
|
145 |
/** |
/** |
146 |
* Calls the <code>in.read()</code> method |
* Calls the <code>in.read()</code> method |
147 |
* |
* |
154 |
return(in.read()); |
return(in.read()); |
155 |
} |
} |
156 |
|
|
|
/*************************************************************************/ |
|
|
|
|
157 |
/** |
/** |
158 |
* Calls the <code>in.read(char[], int, int)</code> method. |
* Calls the <code>in.read(char[], int, int)</code> method. |
159 |
* |
* |
170 |
return(in.read(buf, offset, len)); |
return(in.read(buf, offset, len)); |
171 |
} |
} |
172 |
|
|
|
/*************************************************************************/ |
|
|
|
|
173 |
/** |
/** |
174 |
* This method closes the stream by calling the <code>close()</code> method |
* This method closes the stream by calling the <code>close()</code> method |
175 |
* of the underlying stream. |
* of the underlying stream. |