OutputStream outputStream = outputSupplier.getOutput();
if (outputStream instanceof SliceOutput) {
sliceOutput = (SliceOutput) outputStream;
}
else {
sliceOutput = new OutputStreamSliceOutput(outputStream);
}
encoder = encoding.createBlocksWriter(type, sliceOutput);
}
catch (IOException e) {
throw Throwables.propagate(e);