equal
deleted
inserted
replaced
105 * <p> |
105 * <p> |
106 * Subclasses of <code>OutputStream</code> must provide an |
106 * Subclasses of <code>OutputStream</code> must provide an |
107 * implementation for this method. |
107 * implementation for this method. |
108 * |
108 * |
109 * @param b the <code>byte</code>. |
109 * @param b the <code>byte</code>. |
110 * @exception IOException if an I/O error occurs. In particular, |
110 * @throws IOException if an I/O error occurs. In particular, |
111 * an <code>IOException</code> may be thrown if the |
111 * an <code>IOException</code> may be thrown if the |
112 * output stream has been closed. |
112 * output stream has been closed. |
113 */ |
113 */ |
114 public abstract void write(int b) throws IOException; |
114 public abstract void write(int b) throws IOException; |
115 |
115 |
118 * to this output stream. The general contract for <code>write(b)</code> |
118 * to this output stream. The general contract for <code>write(b)</code> |
119 * is that it should have exactly the same effect as the call |
119 * is that it should have exactly the same effect as the call |
120 * <code>write(b, 0, b.length)</code>. |
120 * <code>write(b, 0, b.length)</code>. |
121 * |
121 * |
122 * @param b the data. |
122 * @param b the data. |
123 * @exception IOException if an I/O error occurs. |
123 * @throws IOException if an I/O error occurs. |
124 * @see java.io.OutputStream#write(byte[], int, int) |
124 * @see java.io.OutputStream#write(byte[], int, int) |
125 */ |
125 */ |
126 public void write(byte b[]) throws IOException { |
126 public void write(byte b[]) throws IOException { |
127 write(b, 0, b.length); |
127 write(b, 0, b.length); |
128 } |
128 } |
149 * {@code b}, then an {@code IndexOutOfBoundsException} is thrown. |
149 * {@code b}, then an {@code IndexOutOfBoundsException} is thrown. |
150 * |
150 * |
151 * @param b the data. |
151 * @param b the data. |
152 * @param off the start offset in the data. |
152 * @param off the start offset in the data. |
153 * @param len the number of bytes to write. |
153 * @param len the number of bytes to write. |
154 * @exception IOException if an I/O error occurs. In particular, |
154 * @throws IOException if an I/O error occurs. In particular, |
155 * an <code>IOException</code> is thrown if the output |
155 * an <code>IOException</code> is thrown if the output |
156 * stream is closed. |
156 * stream is closed. |
157 */ |
157 */ |
158 public void write(byte b[], int off, int len) throws IOException { |
158 public void write(byte b[], int off, int len) throws IOException { |
159 Objects.checkFromIndexSize(off, len, b.length); |
159 Objects.checkFromIndexSize(off, len, b.length); |
177 * passed to the operating system for writing; it does not guarantee that |
177 * passed to the operating system for writing; it does not guarantee that |
178 * they are actually written to a physical device such as a disk drive. |
178 * they are actually written to a physical device such as a disk drive. |
179 * <p> |
179 * <p> |
180 * The <code>flush</code> method of <code>OutputStream</code> does nothing. |
180 * The <code>flush</code> method of <code>OutputStream</code> does nothing. |
181 * |
181 * |
182 * @exception IOException if an I/O error occurs. |
182 * @throws IOException if an I/O error occurs. |
183 */ |
183 */ |
184 public void flush() throws IOException { |
184 public void flush() throws IOException { |
185 } |
185 } |
186 |
186 |
187 /** |
187 /** |
190 * is that it closes the output stream. A closed stream cannot perform |
190 * is that it closes the output stream. A closed stream cannot perform |
191 * output operations and cannot be reopened. |
191 * output operations and cannot be reopened. |
192 * <p> |
192 * <p> |
193 * The <code>close</code> method of <code>OutputStream</code> does nothing. |
193 * The <code>close</code> method of <code>OutputStream</code> does nothing. |
194 * |
194 * |
195 * @exception IOException if an I/O error occurs. |
195 * @throws IOException if an I/O error occurs. |
196 */ |
196 */ |
197 public void close() throws IOException { |
197 public void close() throws IOException { |
198 } |
198 } |
199 |
199 |
200 } |
200 } |