Move character encoding logic out to common, try again to improve its handling of...
[zxing.git] / core / src / com / google / zxing / Writer.java
index 936f1dd..6474ca7 100644 (file)
@@ -16,7 +16,7 @@
 
 package com.google.zxing;
 
-import com.google.zxing.common.ByteMatrix;
+import com.google.zxing.common.BitMatrix;
 
 import java.util.Hashtable;
 
@@ -30,25 +30,25 @@ public interface Writer {
   /**
    * Encode a barcode using the default settings.
    *
-   * @param contents The raw contents to encode in the barcode
+   * @param contents The contents to encode in the barcode
    * @param format The barcode format to generate
    * @param width The preferred width in pixels
    * @param height The preferred height in pixels
    * @return The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white)
    */
-  ByteMatrix encode(byte[] contents, BarcodeFormat format, int width, int height)
+  BitMatrix encode(String contents, BarcodeFormat format, int width, int height)
       throws WriterException;
 
   /**
    *
-   * @param contents The raw contents to encode in the barcode
+   * @param contents The contents to encode in the barcode
    * @param format The barcode format to generate
    * @param width The preferred width in pixels
    * @param height The preferred height in pixels
    * @param hints Additional parameters to supply to the encoder
    * @return The generated barcode as a Matrix of unsigned bytes (0 == black, 255 == white)
    */
-  ByteMatrix encode(byte[] contents, BarcodeFormat format, int width, int height, Hashtable hints)
+  BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Hashtable hints)
       throws WriterException;
 
 }