Example #1
0
 /// <summary>
 /// Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".
 /// </summary>
 /// <param name="content">The content.</param>
 /// <param name="mode">The mode.</param>
 /// <param name="bits">The bits.</param>
 /// <param name="encoding">The encoding.</param>
 internal static void appendBytes(String content,
                                  Mode mode,
                                  BitArray bits,
                                  String encoding)
 {
     if (mode.Equals(Mode.NUMERIC))
     {
         appendNumericBytes(content, bits);
     }
     else
     if (mode.Equals(Mode.ALPHANUMERIC))
     {
         appendAlphanumericBytes(content, bits);
     }
     else
     if (mode.Equals(Mode.BYTE))
     {
         append8BitBytes(content, bits, encoding);
     }
     else
     if (mode.Equals(Mode.KANJI))
     {
         appendKanjiBytes(content, bits);
     }
     else
     {
         throw new WriterException("Invalid mode: " + mode);
     }
 }
Example #2
0
 /// <summary>
 /// Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".
 /// </summary>
 /// <param name="content">The content.</param>
 /// <param name="mode">The mode.</param>
 /// <param name="bits">The bits.</param>
 /// <param name="encoding">The encoding.</param>
 internal static void appendBytes(String content,
                                  Mode mode,
                                  BitArray bits,
                                  String encoding)
 {
     if (mode.Equals(Mode.BYTE))
     {
         append8BitBytes(content, bits, encoding);
     }
     else
     {
         throw new WriterException("Invalid mode: " + mode);
     }
 }
Example #3
0
 /// <summary>
 /// Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".
 /// </summary>
 /// <param name="content">The content.</param>
 /// <param name="mode">The mode.</param>
 /// <param name="bits">The bits.</param>
 /// <param name="encoding">The encoding.</param>
 internal static void appendBytes(String content,
                         Mode mode,
                         BitArray bits,
                         String encoding)
 {
    if (mode.Equals(Mode.NUMERIC))
       appendNumericBytes(content, bits);
    else
       if (mode.Equals(Mode.ALPHANUMERIC))
          appendAlphanumericBytes(content, bits);
       else
          if (mode.Equals(Mode.BYTE))
             append8BitBytes(content, bits, encoding);
          else
             if (mode.Equals(Mode.KANJI))
                appendKanjiBytes(content, bits);
             else
                throw new WriterException("Invalid mode: " + mode);
 }
Example #4
0
 /// <summary>
 /// Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".
 /// </summary>
 /// <param name="content">The content.</param>
 /// <param name="mode">The mode.</param>
 /// <param name="bits">The bits.</param>
 /// <param name="encoding">The encoding.</param>
 internal static void appendBytes(String content,
                         Mode mode,
                         BitArray bits,
                         String encoding)
 {
   if (mode.Equals(Mode.BYTE))
       append8BitBytes(content, bits, encoding);
       else
           throw new WriterException("Invalid mode: " + mode);
 }