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

    https://github.com/apache/incubator-daffodil/pull/12#discussion_r153950949
  
    --- Diff: 
daffodil-io/src/main/scala/edu/illinois/ncsa/daffodil/io/FormatInfo.scala ---
    @@ -0,0 +1,49 @@
    +package edu.illinois.ncsa.daffodil.io
    +
    +import java.nio.charset.CharsetDecoder
    +import java.nio.charset.CharsetEncoder
    +import edu.illinois.ncsa.daffodil.schema.annotation.props.gen.BitOrder
    +import edu.illinois.ncsa.daffodil.schema.annotation.props.gen.ByteOrder
    +import 
edu.illinois.ncsa.daffodil.schema.annotation.props.gen.BinaryFloatRep
    +import edu.illinois.ncsa.daffodil.util.MaybeInt
    +import java.nio.charset.Charset
    +import java.nio.charset.CodingErrorAction
    +import 
edu.illinois.ncsa.daffodil.schema.annotation.props.gen.EncodingErrorPolicy
    +import edu.illinois.ncsa.daffodil.util.Maybe
    +import edu.illinois.ncsa.daffodil.schema.annotation.props.gen.UTF16Width
    +
    +/**
    + * Abstract interface to obtain format properties.
    + *
    + * By passing in an object that provides quick access to these, we avoid 
the
    + * need to have setters/getters that change state in the I/O layer.
    + */
    +trait FormatInfo {
    +  def encoder: CharsetEncoder
    --- End diff --
    
    add scaladoc per method. Explain things like why we have decoder/encoder as 
well as reportingDecoder and replacingDecoder, and why codingErrorAction shows 
through to here.
    
    Ex: fillByte is here because it can be specified as a character, in which 
case you need the charset encoding to figure out the corresponding byte. 


---

Reply via email to