java.lang.AutoCloseable
, org.nanohttpd.protocols.http.tempfiles.ITempFile
public class InMemoryTempFile
extends java.lang.Object
implements org.nanohttpd.protocols.http.tempfiles.ITempFile, java.lang.AutoCloseable
ITempFile
, keeping the file in memory.
The getName()
can be used to retrieve the file
using getFileByName(java.lang.String)
method.Constructor | Description |
---|---|
InMemoryTempFile() |
Modifier and Type | Method | Description |
---|---|---|
void |
close() |
|
void |
delete() |
|
static @Nullable InMemoryTempFile |
getFileByName(@NonNull java.lang.String name) |
|
java.io.ByteArrayInputStream |
getInputByteStream() |
|
java.lang.String |
getName() |
|
java.io.ByteArrayOutputStream |
getOutputByteStream() |
|
java.io.OutputStream |
open() |
public void delete() throws java.lang.Exception
delete
in interface org.nanohttpd.protocols.http.tempfiles.ITempFile
java.lang.Exception
public java.lang.String getName()
getName
in interface org.nanohttpd.protocols.http.tempfiles.ITempFile
public java.io.OutputStream open() throws java.lang.Exception
open
in interface org.nanohttpd.protocols.http.tempfiles.ITempFile
java.lang.Exception
public void close() throws java.lang.Exception
close
in interface java.lang.AutoCloseable
java.lang.Exception
public java.io.ByteArrayOutputStream getOutputByteStream()
public java.io.ByteArrayInputStream getInputByteStream()
public static @Nullable InMemoryTempFile getFileByName(@NonNull java.lang.String name)