@Override
  public byte[] marshalling(AgentData agentData) {
    AgentOutputStream aos = null;
    FileData data = (FileData) agentData;
    try {
      aos = ObjectFactory.getObjectPool(AgentOutputStream.class).borrowObject();

      // fixed
      aos.writeString(data.getAgentId(), APMConstants.AGENT_ID_LEN);
      aos.writeByte((byte) data.getTypeCd());
      aos.writeString(data.getReqId(), APMConstants.REQ_ID_LEN);
      aos.writeShort(data.getReqSeq());
      aos.writeString(data.getReqChkDtm(), APMConstants.DTM_LEN);
      aos.writeString(data.getInOutCl(), APMConstants.INOUT_CL_LEN);
      aos.writeInt(data.getElapsedTime());

      // 파일 타입일 때는 ip/port가 없으므로 빈 값으로 보낸다.
      aos.writeString("", APMConstants.IP_LEN);
      aos.writeInt(0);
      aos.writeInt(0);

      aos.writeString(data.getFilePath());
      aos.writeByte((byte) APMConstants.COL_DELIMITER);

      return aos.toByteArray();
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      try {
        ObjectFactory.getObjectPool(AgentOutputStream.class).returnObject(aos);
      } catch (Exception e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }
    return aos.toByteArray();
  }