Package org.apache.juneau.serializer
Class OutputStreamSerializerSession
java.lang.Object
org.apache.juneau.ContextSession
org.apache.juneau.BeanSession
org.apache.juneau.BeanTraverseSession
org.apache.juneau.serializer.SerializerSession
org.apache.juneau.serializer.OutputStreamSerializerSession
- Direct Known Subclasses:
- MsgPackSerializerSession
Subclass of 
It has 1 abstract method to implement...
SerializerSession for stream-based serializers.
 Description
This class is the parent class of all byte-based serializers.It has 1 abstract method to implement...
Notes:
- This class is not thread safe and is typically discarded after one use.
See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classBuilder class.
- 
Field SummaryFields inherited from class org.apache.juneau.BeanTraverseSessionindent
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedConstructor.
- 
Method SummaryModifier and TypeMethodDescriptionCreates a new builder for this object.protected SerializerPipecreatePipe(Object output) Wraps the specified input object into aParserPipeobject so that it can be easily converted into a stream or reader.protected final BinaryFormatBinary output format.final booleanReturnstrue if this serializer subclasses fromWriterSerializer.final byte[]Convenience method for serializing an object to abyte final StringShortcut method for serializing an object to a String.Methods inherited from class org.apache.juneau.serializer.SerializerSessionaddVarBean, canIgnoreValue, create, createBeanTypeNameProperty, createDefaultVarResolverSession, doSerialize, forEachEntry, forEachEntry, generalize, getBeanTypeName, getExpectedRootType, getJavaMethod, getListener, getListener, getResponseHeaders, getSchema, getUriContext, getUriRelativity, getUriResolution, getUriResolver, getVarResolver, handleThrown, isAddBeanTypes, isAddRootType, isKeepNullProperties, isSortCollections, isSortMaps, isTrimEmptyCollections, isTrimEmptyMaps, isTrimStrings, onBeanGetterException, onError, properties, push2, relativizeUri, resolve, resolveUri, serialize, sort, sort, sort, swap, toList, toString, trimMethods inherited from class org.apache.juneau.BeanTraverseSessiongetInitialDepth, getLastLocation, getMaxDepth, getOptionalType, getOptionalValue, getStack, isDetectRecursions, isIgnoreRecursions, isOptional, isRoot, pop, push, setCurrentClass, setCurrentProperty, willExceedDepth, willRecurseMethods inherited from class org.apache.juneau.BeanSession_class, addWarning, convertToMemberType, convertToMemberType, convertToType, convertToType, convertToType, create, getArgsClassMeta, getBeanClassVisibility, getBeanConstructorVisibility, getBeanDictionary, getBeanFieldVisibility, getBeanMeta, getBeanMethodVisibility, getBeanRegistry, getBeanTypePropertyName, getBeanTypePropertyName, getClassMeta, getClassMeta, getClassMetaForObject, getClassMetaForObject, getLocale, getMediaType, getNamePropertyName, getNotBeanClasses, getNotBeanPackagesNames, getNotBeanPackagesPrefixes, getPropertyNamer, getSwaps, getTimeZone, getTimeZoneId, isBean, isBean, isBeanMapPutReturnsOldValue, isBeansRequireDefaultConstructor, isBeansRequireSerializable, isBeansRequireSettersForGetters, isBeansRequireSomeProperties, isFindFluentSetters, isIgnoreInvocationExceptionsOnGetters, isIgnoreInvocationExceptionsOnSetters, isIgnoreMissingSetters, isIgnoreUnknownBeanProperties, isIgnoreUnknownNullBeanProperties, isSortProperties, isUseEnumNames, isUseInterfaceProxies, isUseJavaBeanIntrospector, newBean, newBean, newBeanMap, newBeanMap, newGenericMap, object, string, toArray, toBeanMap, toBeanMap, toBeanMapMethods inherited from class org.apache.juneau.ContextSessioncheckForWarnings, getContext, getSessionProperties, getWarnings, isDebug, toString
- 
Constructor Details- 
OutputStreamSerializerSessionConstructor.- Parameters:
- builder- The builder for this object.
 
 
- 
- 
Method Details- 
createCreates a new builder for this object.- Parameters:
- ctx- The context creating this session.
- Returns:
- A new builder.
 
- 
isWriterSerializerDescription copied from class:SerializerSessionReturnstrue if this serializer subclasses fromWriterSerializer.- Overrides:
- isWriterSerializerin class- SerializerSession
- Returns:
- true if this serializer subclasses from- WriterSerializer.
 
- 
createPipeDescription copied from class:SerializerSessionWraps the specified input object into aParserPipeobject so that it can be easily converted into a stream or reader.- Overrides:
- createPipein class- SerializerSession
- Parameters:
- output- The output location.
 For character-based serializers, this can be any of the following types:- Writer
- OutputStream- Output will be written as UTF-8 encoded stream.
- File- Output will be written as system-default encoded stream.
- StringBuilder
 
 For byte-based serializers, this can be any of the following types:
- Returns:
- A new ParserPipewrapper around the specified input object.
 
- 
serializeConvenience method for serializing an object to abyte - Overrides:
- serializein class- SerializerSession
- 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.
 
- 
serializeToStringDescription copied from class:SerializerSessionShortcut method for serializing an object to a String.- Overrides:
- serializeToStringin class- SerializerSession
- Parameters:
- o- The object to serialize.
- Returns:
- The serialized object.
   
 Character-based serializers will return aString 
 Stream-based serializers will return abyte []OutputStreamSerializer.Builder.binaryFormat(BinaryFormat)setting.
- Throws:
- SerializeException- If a problem occurred trying to convert the output.
 
- 
getBinaryFormatBinary output format.- Returns:
- The format to use for the serializeToString(Object)method on stream-based serializers when converting byte arrays to strings.
- See Also:
 
 
-