Package com.apelle.acsv.annotations

Examples of com.apelle.acsv.annotations.CSVCase.type()


                if (defaultCounter > 1) {
                    LOGGER.fatal("Only one Method could be used as default case");
                    throw new RuntimeException("One one Method could be used as default case");
                }

                if (csvCase.type().equals(CSVCase.OutputType.FILE)) {
                    streams.put(csvCase.caseNum(), new FileOutputStream(new File(csvCase.file())));
                }
            }

            if (m.getAnnotation(CSVBegin.class) != null) {
View Full Code Here


                    LineHolder lh = new LineHolder(line, records);
                    String[] outFields = (String[]) method.invoke(processor, lh);
                    LOGGER.trace(" -> OUT: " + Arrays.toString(records));
                    String outLine = packLine(outFields) + "\n";

                    switch (csvCase.type()) {
                        case FILE:
                            streams.get(csvCase.caseNum()).write(outLine.getBytes());
                            break;
                        case SYSTEM_ERR:
                            System.err.println(outLine);
View Full Code Here

                        case SYSTEM_OUT:
                            System.out.println(outLine);
                            break;
                        default:
                            LOGGER.fatal("File output not valid: " + csvCase.type());
                    }
                } else {
                    LOGGER.info(" -> NOT match!");
                }
            }
View Full Code Here

                LineHolder lh = new LineHolder(line, records);
                String[] outFields = (String[]) method.invoke(processor, lh);
                LOGGER.trace(" -> OUT: " + Arrays.toString(records));
                String outLine = packLine(outFields) + "\n";

                switch (csvCase.type()) {
                    case FILE:
                        streams.get(csvCase.caseNum()).write(outLine.getBytes());
                        break;
                    case SYSTEM_ERR:
                        System.err.println(outLine);
View Full Code Here

                    case SYSTEM_OUT:
                        System.out.println(outLine);
                        break;
                    default:
                        LOGGER.fatal("File output not valid: " + csvCase.type());
                }
            }

        }
        br.close();
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.