@Override public StringInputRowParser withParseSpec(ParseSpec parseSpec) { return new StringInputRowParser(parseSpec, getEncoding()); }
public <T> InputRowParser<T> decorate(final InputRowParser<T> parser) { // Always decorates, even if the transformSpec is a no-op. This is so fromInputRowParser can insist that the // parser is a transforming parser, and possibly help detect coding errors where someone forgot to call "decorate". if (parser instanceof StringInputRowParser) { // Hack to support the fact that some callers use special methods in StringInputRowParser, such as // parse(String) and startFileFromBeginning. return (InputRowParser<T>) new TransformingStringInputRowParser( parser.getParseSpec(), ((StringInputRowParser) parser).getEncoding(), this ); } else { return new TransformingInputRowParser<>(parser, this); } }
source = Resources.asByteSource(new File(resource).toURI().toURL()).asCharSource( Charset.forName( parser.getEncoding() source = Resources.asByteSource(loader.getResource(resource)).asCharSource( Charset.forName( parser.getEncoding()
@Override public StringInputRowParser withParseSpec(ParseSpec parseSpec) { return new StringInputRowParser(parseSpec, getEncoding()); }
public <T> InputRowParser<T> decorate(final InputRowParser<T> parser) { // Always decorates, even if the transformSpec is a no-op. This is so fromInputRowParser can insist that the // parser is a transforming parser, and possibly help detect coding errors where someone forgot to call "decorate". if (parser instanceof StringInputRowParser) { // Hack to support the fact that some callers use special methods in StringInputRowParser, such as // parse(String) and startFileFromBeginning. return (InputRowParser<T>) new TransformingStringInputRowParser( parser.getParseSpec(), ((StringInputRowParser) parser).getEncoding(), this ); } else { return new TransformingInputRowParser<>(parser, this); } }
source = Resources.asByteSource(new File(resource).toURI().toURL()).asCharSource( Charset.forName( parser.getEncoding() source = Resources.asByteSource(loader.getResource(resource)).asCharSource( Charset.forName( parser.getEncoding()