class ByteArrayPayloadDataOutputParameter implements DataOutputParameter<byte[]> {

  @Override
  public void insert(byte[] data, InterlokMessage msg) throws InterlokException {
    try (OutputStream os = msg.getOutputStream()) {
      os.write(data);
    } catch (Exception e) {
      throw ExceptionHelper.wrapCoreException(e);
    }
  }

}