| Modifier and Type | Class and Description |
|---|---|
static interface |
InspectedContent.Inspector
Interface that can be used to inspect content as it is initially read.
|
| Modifier and Type | Method and Description |
|---|---|
static InspectedContent |
of(Content content,
InspectedContent.Inspector... inspectors)
Factory method to create an
InspectedContent instance from source content. |
static InspectedContent |
of(java.io.InputStream inputStream,
InspectedContent.Inspector... inspectors)
Factory method to create an
InspectedContent instance from a source input
stream. |
static InspectedContent |
of(IOConsumer<java.io.OutputStream> writer,
InspectedContent.Inspector... inspectors)
Factory method to create an
InspectedContent instance from a source write
method. |
int |
size()
The size of the content in bytes.
|
void |
writeTo(java.io.OutputStream outputStream)
Write the content to the given output stream.
|
public int size()
Contentpublic void writeTo(java.io.OutputStream outputStream)
throws java.io.IOException
Contentpublic static InspectedContent of(java.io.InputStream inputStream, InspectedContent.Inspector... inspectors) throws java.io.IOException
InspectedContent instance from a source input
stream.inputStream - the content input streaminspectors - any inspectors to applyjava.io.IOException - on IO errorpublic static InspectedContent of(Content content, InspectedContent.Inspector... inspectors) throws java.io.IOException
InspectedContent instance from source content.content - the contentinspectors - any inspectors to applyjava.io.IOException - on IO errorpublic static InspectedContent of(IOConsumer<java.io.OutputStream> writer, InspectedContent.Inspector... inspectors) throws java.io.IOException
InspectedContent instance from a source write
method.writer - a consumer representing the write methodinspectors - any inspectors to applyjava.io.IOException - on IO error