commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CSV-189) CSVParser: Add constructor accepting InputStream
Date Sat, 30 Jul 2016 15:18:20 GMT

     [ https://issues.apache.org/jira/browse/CSV-189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Gregory updated CSV-189:
-----------------------------
    Description: 
Please supply a CSVParser.parse operation accepting an InputStream, e.g. 

{code:java}
public static CSVParser parse(InputStream stream, final CSVFormat format) throws IOException
{
        Assertions.notNull(stream, "stream");
        Assertions.notNull(format, "format");

        return new CSVParser(new InputStreamReader(stream), format);
}
{code}

This can be used more widely than File or String, and helps reading from resources (getClassLoader().getResourceAsStream()).

  was:
Please supply a CSVParser.parse operation accepting an InputStream, e.g. 

public static CSVParser parse(InputStream stream, final CSVFormat format) throws IOException
{
        Assertions.notNull(stream, "stream");
        Assertions.notNull(format, "format");

        return new CSVParser(new InputStreamReader(stream), format);
}

This can be used more widely than File or String, and helps reading from resources (getClassLoader().getResourceAsStream()).


> CSVParser: Add constructor accepting InputStream
> ------------------------------------------------
>
>                 Key: CSV-189
>                 URL: https://issues.apache.org/jira/browse/CSV-189
>             Project: Commons CSV
>          Issue Type: Improvement
>          Components: Parser
>    Affects Versions: 1.4
>         Environment: all
>            Reporter: Peter Holzwarth
>            Priority: Trivial
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Please supply a CSVParser.parse operation accepting an InputStream, e.g. 
> {code:java}
> public static CSVParser parse(InputStream stream, final CSVFormat format) throws IOException
{
>         Assertions.notNull(stream, "stream");
>         Assertions.notNull(format, "format");
>         return new CSVParser(new InputStreamReader(stream), format);
> }
> {code}
> This can be used more widely than File or String, and helps reading from resources (getClassLoader().getResourceAsStream()).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message