KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > stefanochizzolini > clown > bytes > IOutputStream


1 /*
2   Copyright 2006 Stefano Chizzolini. http://clown.stefanochizzolini.it
3
4   Contributors:
5     * Stefano Chizzolini (original code developer, info@stefanochizzolini.it):
6       contributed code is Copyright 2006 by Stefano Chizzolini.
7
8   This file should be part of the source code distribution of "PDF Clown library"
9   (the Program): see the accompanying README files for more info.
10
11   This Program is free software; you can redistribute it and/or modify it under
12   the terms of the GNU General Public License as published by the Free Software
13   Foundation; either version 2 of the License, or (at your option) any later version.
14
15   This Program is distributed in the hope that it will be useful, but WITHOUT ANY
16   WARRANTY, either expressed or implied; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more details.
18
19   You should have received a copy of the GNU General Public License along with this
20   Program (see README files); if not, go to the GNU website (http://www.gnu.org/).
21
22   Redistribution and use, with or without modification, are permitted provided that such
23   redistributions retain the above copyright notice, license and disclaimer, along with
24   this list of conditions.
25 */

26
27 package it.stefanochizzolini.clown.bytes;
28
29 import java.io.EOFException JavaDoc;
30
31 /**
32   Output stream interface.
33 */

34 public interface IOutputStream
35 {
36   /**
37     Writes a byte array into the stream.
38     @param data Byte array to write into the stream.
39     @return Number of bytes written.
40   */

41   int write(
42     byte[] data
43     );
44
45   /**
46     Writes a byte range into the stream.
47     @param data Byte array to write into the stream.
48     @param offset Location in the byte array at which writing begins.
49     @param length Number of bytes to write.
50     @return Number of bytes written.
51   */

52   int write(
53     byte[] data,
54     int offset,
55     int length
56     );
57
58   /**
59     Writes a string into the stream.
60     @param data String to write into the stream.
61     @return Number of bytes written.
62   */

63   int write(
64     String JavaDoc data
65     );
66
67   /**
68     Writes an {@link IInputStream IInputStream} into the stream.
69     @param data IInputStream to write into the stream.
70     @return Number of bytes written.
71   */

72   int write(
73     IInputStream data
74     );
75 }
Popular Tags