Package org.shiftone.jrat.util.io

Examples of org.shiftone.jrat.util.io.InputOutputException


  public Object parse(String value) {

    try {
      return (value == null) ? null : dateFormat.parse(value);
    } catch (ParseException e) {
      throw new InputOutputException("failed to parse date : " + value, e);
    }
  }
View Full Code Here


  }

  public Object getValue(int columnIndex, boolean nullable) {

    if (current == null) {
      throw new InputOutputException("current record is null");
    }
    Field field = delimitedFormat.getField(columnIndex);
    String textValue = current[columnIndex];
    Object value = field.parse(textValue);
    if ((value == null) && (!nullable)) {
      throw new InputOutputException("value is null on line " + getLineNumber() + " column " + columnIndex);
    }
    return value;
  }
View Full Code Here

  public int getFieldIndex(String title) {

    Integer index = (Integer) columnNameMapping.get(title.toLowerCase());
    if (index == null) {
      throw new InputOutputException("field title is not known : " + title);
    }
    return index.intValue();
  }
View Full Code Here

            if (!s.equals(t)) {
                IOUtil.copy(source, target);
            }

        } catch (Exception e) {
            throw new InputOutputException("unable to copy to : " + target, e);
        }
    }
View Full Code Here

      printStream.println("# the following system properties were present during injection");
      printStream.flush();
      System.getProperties().store(zipOutputStream, null);
      zipOutputStream.closeEntry();
    } catch (IOException e) {
      throw new InputOutputException("unable to add comment file to archive", e);
    }
  }
View Full Code Here

    byte[] newClassData = transformer.inject(inputStream, fileName, options);
    try {
      outputStream.write(newClassData);
    } catch (Exception e) {

            throw new InputOutputException("unable to write data to output stream", e);

        }
  }
View Full Code Here

    try {
      writer.write("viewer=\"");
      writer.write(StatsOutputViewBuilder.class.getName());
      writer.write("\"\n");
    } catch (IOException e) {
      throw new InputOutputException("failed to write header", e);
    }
    this.writer = new DelimitedWriter(writer, getDelimitedFormat());
  }
View Full Code Here

TOP

Related Classes of org.shiftone.jrat.util.io.InputOutputException

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.