1 |
/* |
/* |
2 |
* $Id$ |
* StreamOutputStream.java |
3 |
* Copyright (C) 2003 The Free Software Foundation |
* Copyright (C) 2003 The Free Software Foundation |
4 |
* |
* |
5 |
* This file is part of GNU inetlib, a library. |
* This file is part of GNU inetlib, a library. |
46 |
* A DTP output stream that implements the FTP stream transfer mode. |
* A DTP output stream that implements the FTP stream transfer mode. |
47 |
* |
* |
48 |
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> |
* @author <a href='mailto:dog@gnu.org'>Chris Burdess</a> |
|
* @version $Revision$ $Date$ |
|
49 |
*/ |
*/ |
50 |
class StreamOutputStream extends DTPOutputStream |
class StreamOutputStream |
51 |
|
extends DTPOutputStream |
52 |
{ |
{ |
53 |
|
|
54 |
StreamOutputStream (DTP dtp, OutputStream out) |
StreamOutputStream(DTP dtp, OutputStream out) |
55 |
{ |
{ |
56 |
super (dtp, out); |
super(dtp, out); |
57 |
} |
} |
58 |
|
|
59 |
public void write (int c) throws IOException |
public void write(int c) |
60 |
{ |
throws IOException |
61 |
if (transferComplete) |
{ |
62 |
{ |
if (transferComplete) |
63 |
return; |
{ |
64 |
} |
return; |
65 |
out.write (c); |
} |
66 |
} |
out.write(c); |
67 |
|
} |
68 |
public void write (byte[] b) throws IOException |
|
69 |
{ |
public void write(byte[] b) |
70 |
write (b, 0, b.length); |
throws IOException |
71 |
} |
{ |
72 |
|
write(b, 0, b.length); |
73 |
public void write (byte[] b, int off, int len) throws IOException |
} |
74 |
{ |
|
75 |
if (transferComplete) |
public void write(byte[] b, int off, int len) |
76 |
{ |
throws IOException |
77 |
return; |
{ |
78 |
} |
if (transferComplete) |
79 |
out.write (b, off, len); |
{ |
80 |
} |
return; |
81 |
|
} |
82 |
|
out.write(b, off, len); |
83 |
|
} |
84 |
|
|
85 |
} |
} |
86 |
|
|