Package uk.org.ogsadai.client.toolkit

Examples of uk.org.ogsadai.client.toolkit.DataStreamData


               ResourceUnknownException,
               ClientException
    {
        StringBuilder resultData = new StringBuilder();
        DataSourceResource dataSource = result.getDataSource();
        DataStreamData data = null;
        resultData.append("[");
        do
        {
            data = dataSource.getDataValues(100);
            for (DataValue value : data.getDataValues())
            {
                resultData.append(value.toString());
                resultData.append(",");
            }
        }
        while (data.getStreamStatus() == DataStreamStatus.OPEN);
        if (resultData.length() > 1)
        {
            resultData.delete(resultData.length()-1, resultData.length());
        }
        resultData.append("]");
        if (data.getStreamStatus() == DataStreamStatus.CLOSED_DUE_TO_ERROR)
        {
            resultData.append("\nCLOSED DUE TO ERROR");
        }
        return resultData.toString();
    }
View Full Code Here


        e.printStackTrace();
      }
    return rs;
  }
  public static String getAsString(Result result){
        DataStreamData data = null;
    try {
      data = result.getDataSource().getFully();
//should i destroy it here?
    //result.getDataSource().destroy();
    } catch (Exception e) {
      LOG.error(e.getMessage());
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
   
        if (data.getStreamStatus() != DataStreamStatus.CLOSED_DUE_TO_ERROR)
        {
          return Arrays.toString(data.getDataValues());
        }
       
    LOG.error("getAsString resulted in ERROR!");
    return null;
  }
View Full Code Here

      }
     
      boolean isFinished = false;
      while (!isFinished && !mShell.isDisposed())
      {
        DataStreamData dataStreamData;
        try {
          dataStreamData = dataSource.getDataValue();
          for(int i = 0; i < dataStreamData.getDataValues().length;
                  i++)
          {
            mBuff.append(dataStreamData.getDataValues()[i]);
          }
          isFinished = (dataStreamData.getStreamStatus()
              == DataStreamStatus.CLOSED);

        } catch (Exception e) {
          mReaderException = e;
        }
View Full Code Here

TOP

Related Classes of uk.org.ogsadai.client.toolkit.DataStreamData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.