Class Plugin.Engine.Target.Sink.ForJarOutputStream
java.lang.Object
net.bytebuddy.build.Plugin.Engine.Target.Sink.ForJarOutputStream
- All Implemented Interfaces:
Closeable, AutoCloseable, Plugin.Engine.Target.Sink
- Enclosing interface:
Plugin.Engine.Target.Sink
public static class Plugin.Engine.Target.Sink.ForJarOutputStream
extends Object
implements Plugin.Engine.Target.Sink
Implements a sink for a jar file.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Plugin.Engine.Target.Sink
Plugin.Engine.Target.Sink.ForJarOutputStream -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionForJarOutputStream(JarOutputStream outputStream) Creates a new sink for a jar file. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidretain(Plugin.Engine.Source.Element element) Retains the supplied element in its original form.voidstore(Map<TypeDescription, byte[]> binaryRepresentations) Stores the supplied binary representation of types in this sink.voidstore(ClassFileVersion classFileVersion, Map<TypeDescription, byte[]> binaryRepresentations) Stores the supplied binary representation of types in this sink.
-
Field Details
-
outputStream
The output stream to write to.
-
-
Constructor Details
-
ForJarOutputStream
Creates a new sink for a jar file.- Parameters:
outputStream- The output stream to write to.
-
-
Method Details
-
store
Stores the supplied binary representation of types in this sink.- Specified by:
storein interfacePlugin.Engine.Target.Sink- Parameters:
binaryRepresentations- The binary representations to store.- Throws:
IOException- If an I/O error occurs.
-
store
public void store(ClassFileVersion classFileVersion, Map<TypeDescription, byte[]> binaryRepresentations) throws IOException Stores the supplied binary representation of types in this sink.- Specified by:
storein interfacePlugin.Engine.Target.Sink- Parameters:
classFileVersion- The version of the multi-release jar file, which should at least be8as previous versions are not recognized by regular class loaders.binaryRepresentations- The binary representations to store.- Throws:
IOException- If an I/O error occurs.
-
retain
Retains the supplied element in its original form.- Specified by:
retainin interfacePlugin.Engine.Target.Sink- Parameters:
element- The element to retain.- Throws:
IOException- If an I/O error occurs.
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-