code: private static String getEncodingToUse(String encoding)
      {
          //get encoding
          String updatedEncoding=encoding;
          if(updatedEncoding==null)
          {
              updatedEncoding=IOHelper.getDefaultEncoding();
          }
          
          return updatedEncoding;
      }
docs: This function returns the encoding to use.
  If provided encoding is null, the default system encoding is returend.
  
  @param   encoding
  The encoding (may be null for system default encoding)
  @return  The encoding to use