public BitMatrix encode(String contents, BarcodeFormat format, int width, int height) throws WriterException { return encode(contents, format, width, height, null); }
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Hashtable hints) throws WriterException { if (contents == null || contents.length() == 0) { throw new IllegalArgumentException("Found empty contents"); } if (width < 0 || height < 0) { throw new IllegalArgumentException("Requested dimensions are too small: " + width + 'x' + height); } byte[] code = encode(contents); return renderResult(code, width, height); }
@Override public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Map<EncodeHintType,?> hints) throws WriterException { if (format != BarcodeFormat.EAN_8) { throw new IllegalArgumentException("Can only encode EAN_8, but got " + format); } return super.encode(contents, format, width, height, hints); }
@Override public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Map<EncodeHintType,?> hints) throws WriterException { if (format != BarcodeFormat.EAN_13) { throw new IllegalArgumentException("Can only encode EAN_13, but got " + format); } return super.encode(contents, format, width, height, hints); }
@Override public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Map<EncodeHintType,?> hints) throws WriterException { if (format != BarcodeFormat.EAN_13) { throw new IllegalArgumentException("Can only encode EAN_13, but got " + format); } return super.encode(contents, format, width, height, hints); }
@Override public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Map<EncodeHintType, ?> hints) throws WriterException { if (format != BarcodeFormat.UPC_E) { throw new IllegalArgumentException("Can only encode UPC_E, but got " + format); } return super.encode(contents, format, width, height, hints); }
@Override public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Map<EncodeHintType,?> hints) throws WriterException { if (format != BarcodeFormat.EAN_8) { throw new IllegalArgumentException("Can only encode EAN_8, but got " + format); } return super.encode(contents, format, width, height, hints); }
@Override public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Map<EncodeHintType, ?> hints) throws WriterException { if (format != BarcodeFormat.UPC_E) { throw new IllegalArgumentException("Can only encode UPC_E, but got " + format); } return super.encode(contents, format, width, height, hints); }
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Hashtable hints) throws WriterException { if (format != BarcodeFormat.CODE_39) { throw new IllegalArgumentException("Can only encode CODE_39, but got " + format); } return super.encode(contents, format, width, height, hints); }
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Hashtable hints) throws WriterException { if (format != BarcodeFormat.EAN_8) { throw new IllegalArgumentException("Can only encode EAN_8, but got " + format); } return super.encode(contents, format, width, height, hints); }
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Hashtable hints) throws WriterException { if (format != BarcodeFormat.ITF) { throw new IllegalArgumentException("Can only encode ITF, but got " + format); } return super.encode(contents, format, width, height, hints); }
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Hashtable hints) throws WriterException { if (format != BarcodeFormat.CODE_128) { throw new IllegalArgumentException("Can only encode CODE_128, but got " + format); } return super.encode(contents, format, width, height, hints); }
public BitMatrix encode(String contents, BarcodeFormat format, int width, int height, Hashtable hints) throws WriterException { if (format != BarcodeFormat.EAN_13) { throw new IllegalArgumentException("Can only encode EAN_13, but got " + format); } return super.encode(contents, format, width, height, hints); }