Package br.com.objectos.comuns.io

Examples of br.com.objectos.comuns.io.FixedLine.column()


    Iterator<FixedLine> iterator = lines.iterator();
    PeekingIterator<FixedLine> peeking = Iterators.peekingIterator(iterator);

    FixedLine line = peeking.peek();

    Integer tipo = line.column(0, 1).get(Integer.class);
    if (tipo.intValue() != 0 || line.getText().length() != 400) {
      throw new ExcecaoCnab(
          line, "Primeira linha não corresponde a um header CNAB400. " +
              "Talvez você tenha enviado o arquivo incorreto?");
    }
View Full Code Here


      throw new ExcecaoCnab(
          line, "Primeira linha não corresponde a um header CNAB400. " +
              "Talvez você tenha enviado o arquivo incorreto?");
    }

    Integer codigo = line.column(76, 79).get(Integer.class);
    Banco banco = Banco.valueOf(codigo.intValue());
    Modelo modelo = banco.getModelo();

    return new HeaderPadrao(banco, modelo, line);
  }
View Full Code Here

  Object apply(Line line) {
    Object value = null;

    try {
      FixedLine fixed = FixedLine.class.cast(line);
      value = fixed.column(pos0 - 1, pos1).get(type);
    } catch (ColumnConversionException e) {
      throw new RecordKeyException(line, this, e);
    }

    return value;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.