Package com.logicaldoc.util.io
Class AutoDeleteInputStream
- java.lang.Object
- 
- java.io.InputStream
- 
- com.logicaldoc.util.io.AutoDeleteInputStream
 
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable
 
 public class AutoDeleteInputStream extends InputStream Wrapper around a standard InputStream that deletes the file after closing.- Since:
- 7.7.1
- Author:
- Marco Meschieri - LogicalDOC
 
- 
- 
Constructor SummaryConstructors Constructor Description AutoDeleteInputStream(File file)AutoDeleteInputStream(InputStream wrappedStream, File file)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()booleanequals(Object obj)inthashCode()voidmark(int readlimit)booleanmarkSupported()intread()intread(byte[] b)intread(byte[] b, int off, int len)voidreset()longskip(long n)StringtoString()- 
Methods inherited from class java.io.InputStreamnullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
 
- 
 
- 
- 
- 
Constructor Detail- 
AutoDeleteInputStreampublic AutoDeleteInputStream(File file) throws FileNotFoundException - Throws:
- FileNotFoundException
 
 - 
AutoDeleteInputStreampublic AutoDeleteInputStream(InputStream wrappedStream, File file) 
 
- 
 - 
Method Detail- 
readpublic int read() throws IOException- Specified by:
- readin class- InputStream
- Throws:
- IOException
 
 - 
readpublic int read(byte[] b) throws IOException- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
 - 
readpublic int read(byte[] b, int off, int len) throws IOException- Overrides:
- readin class- InputStream
- Throws:
- IOException
 
 - 
skippublic long skip(long n) throws IOException- Overrides:
- skipin class- InputStream
- Throws:
- IOException
 
 - 
availablepublic int available() throws IOException- Overrides:
- availablein class- InputStream
- Throws:
- IOException
 
 - 
closepublic void close() throws IOException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- InputStream
- Throws:
- IOException
 
 - 
markpublic void mark(int readlimit) - Overrides:
- markin class- InputStream
 
 - 
resetpublic void reset() throws IOException- Overrides:
- resetin class- InputStream
- Throws:
- IOException
 
 - 
markSupportedpublic boolean markSupported() - Overrides:
- markSupportedin class- InputStream
 
 
- 
 
-