home *** CD-ROM | disk | FTP | other *** search
- package netscape.net;
-
- import java.io.IOException;
- import java.io.OutputStream;
-
- public class URLOutputStream extends OutputStream {
- protected URLConnection connection;
-
- public URLOutputStream(URLConnection con) {
- this.connection = con;
- }
-
- protected native void open() throws IOException;
-
- public native void write(int var1) throws IOException;
-
- public void write(byte[] b) throws IOException {
- this.writeBytes(b, 0, b.length);
- }
-
- public void write(byte[] b, int off, int len) throws IOException {
- this.writeBytes(b, off, len);
- }
-
- private native void writeBytes(byte[] var1, int var2, int var3) throws IOException;
-
- public void close() throws IOException {
- this.pClose();
- this.connection.currentOutputStream = null;
- }
-
- public native void pClose() throws IOException;
-
- protected void finalize() {
- try {
- this.close();
- } catch (IOException var1) {
- }
- }
- }
-