17/12/21 01:47:51.06 24fGH3Wg.net
import java.io.ByteArrayOutputStream;
import java.util.stream.IntStream;
public class Main {
public static void main(String[] args) {
ByteArrayOutputStream b = IntStream.of(0x3e, 0x3e, 0x31, 0xe4, 0xb9, 0x99)
.collect(ByteArrayOutputStream::new, (x, i) -> x.write((byte) i),
(x, y) -> x.write(y.toByteArray(), 0, y.size()));
System.out.println(b);
}
}
URLリンク(ideone.com)