「カスタムOutputFormat」の意味がわかりませんが、これは私がWebアプリで行っていることです(ただし、hadoopに関連するものではありません)。HTH。
import sun.misc.BASE64Decoder;
import java.io.FileOutputStream;
import java.io.OutputStream;
import java.io.PrintStream;
public static void storeImage(String imageBase64, String path) {
imageBase64 = imageBase64.replace("\n", "");
try {
new BASE64Decoder().decodeBufferToByteBuffer(imageBase64);
OutputStream out = new FileOutputStream(path);
PrintStream p = new PrintStream(out);
p.write(new BASE64Decoder().decodeBuffer(imageBase64));
p.flush();
p.close();
} catch (Exception e) {
log.error("Error storing image.", e);
e.printStackTrace();
}
}