org.apache.maven.wagon
Class LazyFileOutputStream

java.lang.Object
  extended byjava.io.OutputStream
      extended byorg.apache.maven.wagon.LazyFileOutputStream

public class LazyFileOutputStream
extends java.io.OutputStream

Variant of FileOutputStream which creates the file only when first portion of data is written.

Version:
$Id: LazyFileOutputStream.java 162476 2005-04-19 02:49:45Z brett $
Author:
Michal Maczka

Field Summary
private  java.io.FileOutputStream delegee
           
private  java.io.File file
           
 
Constructor Summary
LazyFileOutputStream(java.io.File file)
           
LazyFileOutputStream(java.lang.String filename)
           
 
Method Summary
 void close()
           
 boolean equals(java.lang.Object obj)
           
 void flush()
           
 java.nio.channels.FileChannel getChannel()
           
 java.io.FileDescriptor getFD()
           
 int hashCode()
           
private  void initialize()
           
 java.lang.String toString()
           
 void write(byte[] b)
           
 void write(byte[] b, int off, int len)
           
 void write(int b)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

file

private java.io.File file

delegee

private java.io.FileOutputStream delegee
Constructor Detail

LazyFileOutputStream

public LazyFileOutputStream(java.lang.String filename)

LazyFileOutputStream

public LazyFileOutputStream(java.io.File file)
Method Detail

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object obj)

flush

public void flush()
           throws java.io.IOException
Throws:
java.io.IOException

getChannel

public java.nio.channels.FileChannel getChannel()

getFD

public java.io.FileDescriptor getFD()
                             throws java.io.IOException
Throws:
java.io.IOException

hashCode

public int hashCode()

toString

public java.lang.String toString()

write

public void write(byte[] b)
           throws java.io.IOException
Throws:
java.io.IOException

write

public void write(byte[] b,
                  int off,
                  int len)
           throws java.io.IOException
Throws:
java.io.IOException
See Also:
OutputStream.write(byte[], int, int)

write

public void write(int b)
           throws java.io.IOException
Parameters:
b -
Throws:
java.io.IOException

initialize

private void initialize()
                 throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException