Serializer serializer = null;
try {
// Pick the communication channel.
final BootstrapEvent.EventChannelType channel = establishCommunicationChannel();
new Serializer(System.out)
.serialize(new BootstrapEvent(channel))
.flush();
final int bufferSize = 16 * 1024;
switch (channel) {
case STDERR: