return new Base64InputStream(hasResourceStream.getInputStream(), doEncode);
}
@Override
public long writeContent(OutputStream outputStream) throws IOException {
Base64OutputStream codec = new Base64OutputStream(outputStream, doEncode);
try {
return hasResourceStream.writeContent(codec);
} finally {
codec.flush();
codec.close();
}
}
};
}