public class ChangedFileOutputStream extends OutputStream
close()
method. This results in missed/ignored IOExceptions in some
cases. First, OutputStream.flush()
method does not actually flush buffer to the disk. Second, any problems writing to the
file will be reported as IOException thrown by close()
, which are generally ignored.Constructor and Description |
---|
ChangedFileOutputStream(File file) |
ChangedFileOutputStream(File file,
org.sonatype.plexus.build.incremental.BuildContext buildContext) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
protected void |
writeIfNewOrChanged() |
flush, write
public ChangedFileOutputStream(File file) throws FileNotFoundException
FileNotFoundException
public ChangedFileOutputStream(File file, org.sonatype.plexus.build.incremental.BuildContext buildContext) throws FileNotFoundException
FileNotFoundException
public void write(int b)
write
in class OutputStream
public void write(byte[] b, int off, int len)
write
in class OutputStream
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
IOException
protected void writeIfNewOrChanged() throws IOException
IOException
Copyright © 2005–2015 Sonatype, Inc.. All rights reserved.