Class OutputStreamWrapper
java.lang.Object
com.sun.jdo.api.persistence.enhancer.OutputStreamWrapper
This class serves as a wrapper for an output stream of a class file. The
stream is passed as a parameter to the byte code enhancer, that can
sets the classname of the written Java class to the wrapper.
This wrapper is necessary to determine the classname outside the enhancer, after the class has been enhanced, since do do not always know the classname of an opened input stream.
This wrapper is necessary to determine the classname outside the enhancer, after the class has been enhanced, since do do not always know the classname of an opened input stream.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringGets the classname of the written Java class.final OutputStreamGets the wrapped output stream.final voidsetClassName(String classname) Sets the name of the written Java class.
-
Constructor Details
-
OutputStreamWrapper
Constructs a new object.- Parameters:
out- The output stream to wrap.
-
-
Method Details
-
getStream
Gets the wrapped output stream.- Returns:
- The wrapped output stream.
- See Also:
-
out
-
getClassName
Gets the classname of the written Java class. This method should be called after the class has been enhanced.- Returns:
- The name of the written Java class.
- See Also:
-
className
-
setClassName
Sets the name of the written Java class. This method should be called by the enhancer.- Parameters:
classname- The name of the Java class.- See Also:
-
className
-