1 /* |
1 /* |
2 * Copyright (c) 1996, 2005, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
57 } |
57 } |
58 |
58 |
59 /** |
59 /** |
60 * Reads a single character. |
60 * Reads a single character. |
61 * |
61 * |
62 * @exception IOException If an I/O error occurs |
62 * @throws IOException If an I/O error occurs |
63 */ |
63 */ |
64 public int read() throws IOException { |
64 public int read() throws IOException { |
65 return in.read(); |
65 return in.read(); |
66 } |
66 } |
67 |
67 |
68 /** |
68 /** |
69 * Reads characters into a portion of an array. |
69 * Reads characters into a portion of an array. |
70 * |
70 * |
71 * @exception IOException If an I/O error occurs |
71 * @throws IOException If an I/O error occurs |
72 * @exception IndexOutOfBoundsException {@inheritDoc} |
72 * @throws IndexOutOfBoundsException {@inheritDoc} |
73 */ |
73 */ |
74 public int read(char cbuf[], int off, int len) throws IOException { |
74 public int read(char cbuf[], int off, int len) throws IOException { |
75 return in.read(cbuf, off, len); |
75 return in.read(cbuf, off, len); |
76 } |
76 } |
77 |
77 |
78 /** |
78 /** |
79 * Skips characters. |
79 * Skips characters. |
80 * |
80 * |
81 * @exception IOException If an I/O error occurs |
81 * @throws IOException If an I/O error occurs |
82 */ |
82 */ |
83 public long skip(long n) throws IOException { |
83 public long skip(long n) throws IOException { |
84 return in.skip(n); |
84 return in.skip(n); |
85 } |
85 } |
86 |
86 |
87 /** |
87 /** |
88 * Tells whether this stream is ready to be read. |
88 * Tells whether this stream is ready to be read. |
89 * |
89 * |
90 * @exception IOException If an I/O error occurs |
90 * @throws IOException If an I/O error occurs |
91 */ |
91 */ |
92 public boolean ready() throws IOException { |
92 public boolean ready() throws IOException { |
93 return in.ready(); |
93 return in.ready(); |
94 } |
94 } |
95 |
95 |
101 } |
101 } |
102 |
102 |
103 /** |
103 /** |
104 * Marks the present position in the stream. |
104 * Marks the present position in the stream. |
105 * |
105 * |
106 * @exception IOException If an I/O error occurs |
106 * @throws IOException If an I/O error occurs |
107 */ |
107 */ |
108 public void mark(int readAheadLimit) throws IOException { |
108 public void mark(int readAheadLimit) throws IOException { |
109 in.mark(readAheadLimit); |
109 in.mark(readAheadLimit); |
110 } |
110 } |
111 |
111 |
112 /** |
112 /** |
113 * Resets the stream. |
113 * Resets the stream. |
114 * |
114 * |
115 * @exception IOException If an I/O error occurs |
115 * @throws IOException If an I/O error occurs |
116 */ |
116 */ |
117 public void reset() throws IOException { |
117 public void reset() throws IOException { |
118 in.reset(); |
118 in.reset(); |
119 } |
119 } |
120 |
120 |