]> gcc.gnu.org Git - gcc.git/blob - libjava/java/io/OutputStream.java
d0353a4a1d988feeff30a9c2b430e7cd64d1cf00
[gcc.git] / libjava / java / io / OutputStream.java
1 // OutputStream.java - Send output bytes to output sink.
2
3 /* Copyright (C) 1998, 1999 Red Hat, Inc.
4
5 This file is part of libgcj.
6
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
10
11 package java.io;
12
13 /**
14 * @author Tom Tromey <tromey@cygnus.com>
15 * @date September 24, 1998
16 */
17
18 /* Written using "Java Class Libraries", 2nd edition, ISBN 0-201-31002-3
19 * "The Java Language Specification", ISBN 0-201-63451-1
20 * Status: Complete to version 1.1.
21 */
22
23 public abstract class OutputStream
24 {
25 public abstract void write (int b) throws IOException;
26
27 public void write (byte[] b) throws IOException, NullPointerException
28 {
29 write (b, 0, b.length);
30 }
31
32 public void write (byte[] b, int off, int len)
33 throws IOException, NullPointerException, IndexOutOfBoundsException
34 {
35 if (off < 0 || len < 0 || off + len > b.length)
36 throw new ArrayIndexOutOfBoundsException ();
37 for (int i = 0; i < len; ++i)
38 write (b[off + i]);
39 }
40
41 public void flush () throws IOException
42 {
43 }
44
45 public void close () throws IOException
46 {
47 }
48 }
This page took 0.036475 seconds and 4 git commands to generate.