This class reads Java style properties from an input stream.
コード例 #1
0
ファイル: Properties.cs プロジェクト: bastie/NetVampire
        public void load(java.io.Reader toLoad)
        {
            Kajabity.Tools.Java.JavaPropertyReader reader = new Kajabity.Tools.Java.JavaPropertyReader(this);
            reader.Parse(biz.ritter.io.Reader2Stream.convert(toLoad));
//              new biz.ritter.io.StreamWrapper (
//                biz.ritter.io.Reader2Stream.convert (toLoad), null // better replace by converted Apache commons IO
//              )
//            );

            /* old but only with changes usable
             * Kajabity.Tools.Java.JavaPropertyReader reader = new Kajabity.Tools.Java.JavaPropertyReader(this);
             * reader.Parse(toLoad);
             */
        }
コード例 #2
0
        /// <summary>
        /// Load Java Properties from a stream expecting the format as described in <see cref="JavaPropertyReader"/>.
        /// </summary>
        /// <param name="streamIn">An input stream to read properties from.</param>
        /// <exception cref="ParseException">If the stream source is invalid.</exception>
        public void Load(Stream streamIn)
        {
            JavaPropertyReader reader = new JavaPropertyReader(this);

            reader.Parse(streamIn);
        }
コード例 #3
0
 /// <summary>
 /// Load Java Properties from a stream with the specified encoding and 
 /// expecting the format as described in <see cref="JavaPropertyReader"/>.
 /// </summary>
 /// <param name="streamIn">An input stream to read properties from.</param>
 /// <param name="encoding">The stream's encoding.</param>
 public void Load( Stream streamIn, Encoding encoding )
 {
     JavaPropertyReader reader = new JavaPropertyReader( this );
     reader.Parse( streamIn, encoding );
 }
コード例 #4
0
 /// <summary>
 /// Load Java Properties from a stream expecting the format as described in <see cref="JavaPropertyReader"/>.
 /// </summary>
 /// <param name="streamIn">An input stream to read properties from.</param>
 /// <exception cref="ParseException">If the stream source is invalid.</exception>
 public void Load( Stream streamIn )
 {
     JavaPropertyReader reader = new JavaPropertyReader( this );
     reader.Parse( streamIn );
 }
コード例 #5
0
        /// <summary>
        /// Load Java Properties from a stream with the specified encoding and
        /// expecting the format as described in <see cref="JavaPropertyReader"/>.
        /// </summary>
        /// <param name="streamIn">An input stream to read properties from.</param>
        /// <param name="encoding">The stream's encoding.</param>
        public void Load(Stream streamIn, Encoding encoding)
        {
            JavaPropertyReader reader = new JavaPropertyReader(this);

            reader.Parse(streamIn, encoding);
        }