Package com.ibm.as400.access

Examples of com.ibm.as400.access.IFSFileInputStream


            String value = params[i - 1];

            if (output != null) {
                int length = pgmParam.getOutputDataLength();

                AS400Text text = new AS400Text(length);
                value = (String) text.toObject(output);
            }

            results.add(value);
            i++;
        }
View Full Code Here


                if (param != null) {
                    AS400DataType typeConverter;
                    if (getISeriesEndpoint().getFormat() == Format.binary) {
                        typeConverter = new AS400ByteArray(length);
                    } else {
                        typeConverter = new AS400Text(length, iSeries);
                    }
                    inputData = typeConverter.toBytes(param);
                }
                // Else, inputData will remain null.
            }
View Full Code Here

                int length = pgmParam.getOutputDataLength();
                AS400DataType typeConverter;
                if (getISeriesEndpoint().getFormat() == Format.binary) {
                    typeConverter = new AS400ByteArray(length);
                } else {
                    typeConverter = new AS400Text(length, iSeries);
                }
                javaValue = typeConverter.toObject(output);
            }

            results.add(javaValue);
View Full Code Here

            byte[] inputData = null;
            int outputLength = -1;
            if (input) {
                String value = (String) param;
                inputData = new AS400Text(value.length()).toBytes(value);
            }
            if (output) {
                outputLength = getISeriesEndpoint().getOutputFieldLength(i);
            }
View Full Code Here

            String value = params[i - 1];

            if (output != null) {
                int length = pgmParam.getOutputDataLength();

                AS400Text text = new AS400Text(length);
                value = (String) text.toObject(output);
            }

            results.add(value);
            i++;
        }
View Full Code Here

     * <p/>
     * If the endpoint is configured to publish to a {@link KeyedDataQueue},
     * then the {@link org.apache.camel.Message} header <code>KEY</code> must be set.
     */
    public void process(Exchange exchange) throws Exception {
        BaseDataQueue queue = queueService.getDataQueue();
        if (endpoint.isKeyed()) {
            process((KeyedDataQueue) queue, exchange);
        } else {
            process((DataQueue) queue, exchange);
        }
View Full Code Here

     *
     * @param timeout time to wait when reading from data queue. A value of -1
     *                indicates a blocking read.
     */
    public Exchange receive(long timeout) {
        BaseDataQueue queue = queueService.getDataQueue();
        try {
            if (endpoint.isKeyed()) {
                return receive((KeyedDataQueue) queue, timeout);
            } else {
                return receive((DataQueue) queue, timeout);
            }
        } catch (Exception e) {
            throw new RuntimeCamelException("Unable to read from data queue: " + queue.getName(), e);
        }
    }
View Full Code Here

    mAS400System = aS400System;
    mQSYSObject = qSYSObject;
    mOriginFile = originFile;
    try
    {
      mCharConverter = new CharConverter(encoding);
    }
    catch (UnsupportedEncodingException e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
View Full Code Here

    {
      // open original file for each resolution.
      mOriginFile.open(AS400File.READ_WRITE, 0,
          AS400File.COMMIT_LOCK_LEVEL_DEFAULT);

      CharConverter charConverter = new CharConverter(mEncoding);
      StringTokenizer tokenizer = new StringTokenizer(callData,
          Constants.LINE_SEPERATOR);

      while (tokenizer.hasMoreTokens())
      {
        String token = tokenizer.nextToken();
        // Characters written to it are translated into bytes array
        // according to a specified character encoding.
        dataByte = charConverter.stringToByteArray(token);
        // Save byteArray into Record based on the file format
        Record record = format.getNewRecord(dataByte);
        // write Record into file
        file.write(record);
      }
View Full Code Here

    AS400 as400 = as400Connection.getSystem();

    // Character converter
    try
    {
      mConverter = new CharConverter(as400.getCcsid());
    }
    catch (UnsupportedEncodingException e)
    {
      throw new XException(Constants.LOCATION_EXTERN,
          Constants.LAYER_TECHNICAL,
View Full Code Here

TOP

Related Classes of com.ibm.as400.access.IFSFileInputStream

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.