public class TempSharedFileInputStream
extends javax.mail.util.SharedFileInputStream
InputStream in a temporary file, and
opens SharedFileInputStream on that file. When the stream is closed,
the file will be deleted, and the input stream will be closed.| Modifier and Type | Method and Description |
|---|---|
void |
close()
close - Do nothing, to prevent early close, as the cryptographic processing
stages closes their input stream
|
void |
closeAll()
Deprecated.
Since 4.10.2. Use
closeAndDelete() instead |
void |
closeAndDelete()
closeAll - closes the input stream, and deletes the backing file
|
protected void |
finalize()
finalize - closes also the input stream, and deletes the backing file
|
static TempSharedFileInputStream |
getTempSharedFileInputStream(InputStream aIS,
String sName)
Stores the content of the input
InputStream in a temporary file (in
the system temporary directory, and opens SharedFileInputStream on
that file. |
protected static File |
storeContentToTempFile(InputStream aIS,
String sName)
Stores the content of the input
InputStream in a temporary file (in
the system temporary directory. |
available, getPosition, mark, markSupported, newStream, read, read, reset, skipreadpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class javax.mail.util.SharedFileInputStreamIOExceptionprotected void finalize()
throws Throwable
finalize in class javax.mail.util.SharedFileInputStreamThrowable@Deprecated public void closeAll() throws IOException
closeAndDelete() insteadIOException - in case of errorpublic void closeAndDelete()
throws IOException
IOException - in case of error@Nonnull protected static File storeContentToTempFile(@Nonnull @WillClose InputStream aIS, @Nonnull String sName) throws IOException
InputStream in a temporary file (in
the system temporary directory.aIS - InputStream to read fromsName - name to use in the temporary file to link it to the delivered
message. May be nullFileIOException - in case of IO error@Nonnull public static TempSharedFileInputStream getTempSharedFileInputStream(@Nonnull @WillClose InputStream aIS, @Nonnull String sName) throws IOException
InputStream in a temporary file (in
the system temporary directory, and opens SharedFileInputStream on
that file.aIS - InputStream to read fromsName - name to use in the temporary file to link it to the delivered
message. May be nullTempSharedFileInputStream on the created temporary file.IOException - in case of IO errorCopyright © 2013–2022 Philip Helger. All rights reserved.