com.danielsomerfield.util.io.ByteArrayOutputStreamFactory.groovy Maven / Gradle / Ivy
package com.danielsomerfield.util.io
class ByteArrayOutputStreamFactory implements OutputStreamFactory {
private ByteArrayOutputStream outputStream = new ByteArrayOutputStream()
@Override
OutputStream getOutputStream() {
return outputStream
}
public byte[] toByteArray() {
return outputStream.toByteArray()
}
}