Package org.apache.juneau.serializer
Class OutputStreamSerializer
java.lang.Object
org.apache.juneau.Context
org.apache.juneau.BeanContextable
org.apache.juneau.BeanTraverseContext
org.apache.juneau.serializer.Serializer
org.apache.juneau.serializer.OutputStreamSerializer
- All Implemented Interfaces:
- AnnotationProvider
- Direct Known Subclasses:
- ImageSerializer,- MsgPackSerializer
Subclass of 
Serializer for byte-based serializers.
 Notes:
- This class is thread safe and reusable.
See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class org.apache.juneau.serializer.SerializerSerializer.Null
- 
Field SummaryFields inherited from class org.apache.juneau.ContextCONTEXT_APPLY_FILTERFields inherited from interface org.apache.juneau.AnnotationProviderDEFAULT, DISABLE_ANNOTATION_CACHING
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor.
- 
Method SummaryModifier and TypeMethodDescriptioncreate()Creates a new builder for this object.Create a session builder based on the properties defined on this context.protected final BinaryFormatBinary output format.Returns a session to use for this context.final booleanReturnstrue if this serializer subclasses fromWriterSerializer.protected JsonMapReturns the properties on this bean as a map for debugging.final byte[]Convenience method for serializing an object to abyte Methods inherited from class org.apache.juneau.serializer.Serializercopy, createSerializerBuilder, doSerialize, forEachAcceptMediaType, getListener, getMediaTypeRanges, getPrimaryMediaType, getResponseContentType, getResponseHeaders, getUriContext, getUriRelativity, getUriResolution, isAddBeanTypes, isAddRootType, isKeepNullProperties, isSortCollections, isSortMaps, isTrimEmptyCollections, isTrimEmptyMaps, isTrimStrings, serialize, serializeToStringMethods inherited from class org.apache.juneau.BeanTraverseContextgetInitialDepth, getMaxDepth, isDetectRecursions, isIgnoreRecursionsMethods inherited from class org.apache.juneau.BeanContextablegetBeanContextMethods inherited from class org.apache.juneau.ContextcreateBuilder, firstAnnotation, firstAnnotation, firstAnnotation, firstAnnotation, firstDeclaredAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachAnnotation, forEachDeclaredAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, hasAnnotation, init, isDebug, lastAnnotation, lastAnnotation, lastAnnotation, lastAnnotation, lastDeclaredAnnotation, toString
- 
Constructor Details- 
OutputStreamSerializerConstructor.- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
createCreates a new builder for this object.- Returns:
- A new builder.
 
- 
createSessionDescription copied from class:ContextCreate a session builder based on the properties defined on this context.Use this method for creating sessions where you want to override basic settings. Otherwise, use Context.getSession()directly.- Overrides:
- createSessionin class- Serializer
- Returns:
- A new session builder.
 
- 
getSessionDescription copied from class:ContextReturns a session to use for this context.Note that subclasses may opt to return a reusable non-modifiable session. - Overrides:
- getSessionin class- Serializer
- Returns:
- A new session object.
 
- 
isWriterSerializerDescription copied from class:SerializerReturnstrue if this serializer subclasses fromWriterSerializer.- Overrides:
- isWriterSerializerin class- Serializer
- Returns:
- true if this serializer subclasses from- WriterSerializer.
 
- 
serializeConvenience method for serializing an object to abyte - Overrides:
- serializein class- Serializer
- Parameters:
- o- The object to serialize.
- Returns:
- The output serialized to a byte array.
- Throws:
- SerializeException- If a problem occurred trying to convert the output.
 
- 
getBinaryFormatBinary output format.- Returns:
- The format to use for the Serializer.serializeToString(Object)method on stream-based serializers when converting byte arrays to strings.
- See Also:
 
- 
propertiesDescription copied from class:ContextReturns the properties on this bean as a map for debugging.- Overrides:
- propertiesin class- Serializer
- Returns:
- The properties on this bean as a map for debugging.
 
 
-