
de.codecentric.mule.assertobjectequals.ByteArrayBasedOutputHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of assert-object-equals-connector Show documentation
Show all versions of assert-object-equals-connector Show documentation
A Mule connector for comparing object structures (Map/List) or XML in MUnit tests.
The newest version!
package de.codecentric.mule.assertobjectequals;
import java.io.IOException;
import java.io.OutputStream;
import org.mule.api.MuleEvent;
import org.mule.api.transport.OutputHandler;
/**
* {@link OutputHandler} backed by a byte[]
.
*/
public class ByteArrayBasedOutputHandler implements OutputHandler {
private byte[] data;
/**
* @param data
* Content, will be copied.
*/
public ByteArrayBasedOutputHandler(byte[] data) {
this.data = data.clone();
}
@Override
public void write(MuleEvent event, OutputStream out) throws IOException {
out.write(data);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy