Github user kinow commented on a diff in the pull request:

    https://github.com/apache/jena/pull/334#discussion_r158590480
  
    --- Diff: 
jena-arq/src/main/java/org/apache/jena/riot/resultset/rw/ResultsWriter.java ---
    @@ -77,19 +79,33 @@ private ResultsWriter(Lang lang, Context context) {
             this.context = context;
         }
     
    -    public void write(String url, ResultSet resultSet) {
    -        throw new NotImplemented();
    +    /** Write a result set, using the configurartion of the {@code 
ResultWriter}, to a file */ 
    +    public void write(String filename, ResultSet resultSet) {
    +        Objects.requireNonNull(filename);
    +        Objects.requireNonNull(resultSet);
    +        try ( OutputStream out = openURL(filename) ) {
    +            write(out, resultSet);
    +        } catch (IOException ex) { IO.exception(ex); }
         }
         
    +    /** Write a result set, using the configurartion of the {@code 
ResultWriter}, to an {@code OutputStream}. */ 
         public void write(OutputStream output, ResultSet resultSet) {
    +        Objects.requireNonNull(output);
    +        Objects.requireNonNull(resultSet);
             write(output, resultSet, null, lang);
         }
         
    -    public void write(String url, boolean booleanResult) {
    -        throw new NotImplemented();
    +    /** Write a boolean result, using the configurartion of the {@code 
ResultWriter}, to a file */ 
    +    public void write(String filename, boolean booleanResult) {
    +        Objects.requireNonNull(booleanResult);
    --- End diff --
    
    Only minor nit-pick I found reviewing the commits added after my previous 
comment was here.
    
    `write(String filename, ResultSet resultSet)` has 
`requireNonNull(filename)`, and `requireNonNull(resultSet)`. And in this method 
the `filename` is not checked for null. Not sure if it is intentional or not.


---

Reply via email to