- java.lang.Object
-
- io.helidon.media.common.DefaultMediaSupport
-
- All Implemented Interfaces:
MediaSupport
public class DefaultMediaSupport extends Object implements MediaSupport
MediaSupport which registers default readers and writers to the contexts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultMediaSupport.Builder
Default media support builder.
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.helidon.media.common.MediaSupport
register, streamReaders
-
-
-
-
Method Detail
-
create
public static DefaultMediaSupport create()
Creates new instance ofDefaultMediaSupport
.- Returns:
- new service instance
-
builder
public static DefaultMediaSupport.Builder builder()
Return newDefaultMediaSupport.Builder
of theDefaultMediaSupport
.- Returns:
- default media support builder
-
stringReader
public static MessageBodyReader<String> stringReader()
ReturnString
reader instance.- Returns:
String
reader
-
inputStreamReader
public static MessageBodyReader<InputStream> inputStreamReader()
ReturnInputStream
reader instance.- Returns:
InputStream
reader
-
charSequenceWriter
public static MessageBodyWriter<CharSequence> charSequenceWriter()
ReturnCharSequence
writer instance.- Returns:
CharSequence
writer
-
charSequenceStreamWriter
public static MessageBodyStreamWriter<CharSequence> charSequenceStreamWriter()
ReturnCharSequence
stream writer instance.- Returns:
CharSequence
writer
-
byteChannelWriter
public static MessageBodyWriter<ReadableByteChannel> byteChannelWriter()
Create a new instance ofReadableByteChannel
writer.- Returns:
ReadableByteChannel
writer
-
byteChannelWriter
public static MessageBodyWriter<ReadableByteChannel> byteChannelWriter(RetrySchema schema)
Return newReadableByteChannel
writer instance with specificRetrySchema
.- Parameters:
schema
- retry schema- Returns:
ReadableByteChannel
writer
-
pathWriter
public static MessageBodyWriter<Path> pathWriter()
ReturnPath
writer instance.- Returns:
Path
writer
-
fileWriter
public static MessageBodyWriter<File> fileWriter()
ReturnFile
writer instance.- Returns:
File
writer
-
formParamWriter
public static MessageBodyWriter<FormParams> formParamWriter()
ReturnFormParams
writer instance.- Returns:
FormParams
writer
-
formParamReader
public static MessageBodyReader<FormParams> formParamReader()
ReturnFormParams
reader instance.- Returns:
FormParams
reader
-
throwableWriter
public static MessageBodyWriter<Throwable> throwableWriter(boolean includeStackTraces)
ReturnThrowable
writer instance.- Parameters:
includeStackTraces
- whether stack traces are to be written- Returns:
Throwable
writer
-
readers
public Collection<MessageBodyReader<?>> readers()
Description copied from interface:MediaSupport
Returns the collection of the readers which should be registered.- Specified by:
readers
in interfaceMediaSupport
- Returns:
- readers
-
writers
public Collection<MessageBodyWriter<?>> writers()
Description copied from interface:MediaSupport
Returns the collection of the writers which should be registered.- Specified by:
writers
in interfaceMediaSupport
- Returns:
- writers
-
streamWriters
public Collection<MessageBodyStreamWriter<?>> streamWriters()
Description copied from interface:MediaSupport
Returns the collection of the stream writers which should be registered.- Specified by:
streamWriters
in interfaceMediaSupport
- Returns:
- stream writers
-
-