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()); }
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()); }
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()); }
public void setCodePage(int codePage) { lblHeader.setCodePage(codePage); }