예제 #1
0
  @Override
  public void messageReceived(final ChannelHandlerContext ctx, final MessageEvent e)
      throws Exception {

    super.messageReceived(ctx, e);

    final byte[] packet = getBufferBytes(e);
    this.output.write(
        joiner.join(
            "\"" + timeFormatter.print(new DateTime()) + "\"",
            "\"" + StringUtils.replaceNonPrintableAsciiCharacters(new String(packet)) + "\"",
            "\"" + StringUtils.toHexString(packet) + "\"",
            Long.toString(System.currentTimeMillis() / 1000)));
    output.newLine();
    output.flush();
  }