Exemplo n.º 1
0
  public void setCharacterType(String cs, boolean forceUpper) {
    log.info("encoding type " + cs);
    CodeFunctions cfuncs = CodeFunctions.createEncoderForLBL(cs);

    lblHeader.setEncodingType(cfuncs.getEncodingType());
    textEncoder = cfuncs.getEncoder();
    if (forceUpper && textEncoder instanceof BaseEncoder) {
      BaseEncoder baseEncoder = (BaseEncoder) textEncoder;
      baseEncoder.setUpperCase(true);
    }
    if (lblHeader.getCodePage() == 0) setCodePage(cfuncs.getCodepage());
  }
Exemplo n.º 2
0
  public LBLFile(ImgChannel chan) {
    setHeader(lblHeader);

    setWriter(new BufferedImgFileWriter(chan));

    position(LBLHeader.HEADER_LEN + LBLHeader.INFO_LEN);

    // The zero offset is for no label.
    getWriter().put((byte) 0);

    places.init(this, lblHeader.getPlaceHeader());
  }
Exemplo n.º 3
0
 private void writeBody() {
   // The label section has already been written, but we need to record
   // its size before doing anything else.
   lblHeader.setLabelSize(getWriter().position() - (LBLHeader.HEADER_LEN + LBLHeader.INFO_LEN));
   places.write(getWriter());
 }
Exemplo n.º 4
0
 public void setCodePage(int codePage) {
   lblHeader.setCodePage(codePage);
 }