/** * Check whether a unicode symbol or font specific code can be converted * to {@code byte} according to the encoding. * * @param unicode a unicode symbol or font specific code to be checked. * @return {@code true} if {@code ch} could be encoded. */ public boolean canEncode(int unicode) { return unicodeToCode.containsKey(unicode) || TextUtil.isNonPrintable(unicode); }
protected FontEncoding() { unicodeToCode = new IntHashtable(256); codeToUnicode = ArrayUtil.fillWithValue(new int[256], -1); unicodeDifferences = new IntHashtable(256); fontSpecific = false; }
@Override public String toString() { return MessageFormatUtil.format("@{0} {1};", ruleName, ruleParams); } }
public int getOtfClass(int glyph, boolean strict) { if (strict) { if (mapClass.containsKey(glyph)) { return mapClass.get(glyph); } else { return -1; } } else { return mapClass.get(glyph); } } }
public byte[] charToByte(char char1, String encoding) { if (char1 < 128) return new byte[]{(byte)char1}; else { byte v = (byte)c2b.get(char1); if (v != 0) return new byte[]{v}; else return new byte[0]; } }
/** * Gets the resource's inputstream. * * @param key the full name of the resource. * @return the {@code InputStream} to get the resource or {@code null} if not found. */ public static InputStream getResourceStream(String key) { return getResourceStream(key, null); }
/** * Appends value's hashCode to the current hashCode. * @param value new element * @return this */ public final HashCode append(boolean value) { hashCode = combine(hashCode, value); return this; }
/** * Create a PdfWriter writing to the passed filename and using the passed writer properties. * * @param filename filename of the resulting pdf. * @param properties writerproperties to use. * @throws FileNotFoundException */ public PdfWriter(String filename, WriterProperties properties) throws FileNotFoundException { this(FileUtil.getBufferedOutputStream(filename), properties); }
/** Creates a new instance of Pfm2afm */ private Pfm2afm(RandomAccessFileOrArray input, OutputStream output) throws java.io.IOException { this.input = input; this.output = FileUtil.createPrintWriter(output, "ISO-8859-1"); }
@Override public String toString() { return MessageFormatUtil.format(":prev{0}", evaluator); } }
/** * Check whether a unicode symbol or font specific code can be converted * to {@code byte} according to the encoding. * * @param unicode a unicode symbol or font specific code to be checked. * @return {@code true} if {@code ch} could be encoded. */ public boolean canEncode(int unicode) { return unicodeToCode.containsKey(unicode) || TextUtil.isNonPrintable(unicode); }
protected FontEncoding() { unicodeToCode = new IntHashtable(256); codeToUnicode = ArrayUtil.fillWithValue(new int[256], -1); unicodeDifferences = new IntHashtable(256); fontSpecific = false; }
public byte[] charToByte(char char1, String encoding) { byte v = (byte)translation.get(char1); if (v != 0) return new byte[]{v}; else return new byte[0]; }
/** * Appends value's hashCode to the current hashCode. * @param value new element * @return this */ public final HashCode append(int value) { hashCode = combine(hashCode, value); return this; }
@Override public String toString() { return MessageFormatUtil.format((unitType == PERCENT ? "{0}%" : "{0}pt"), value); } }
/** * Appends value's hashCode to the current hashCode. * @param value new element * @return this */ public final HashCode append(float value) { hashCode = combine(hashCode, value); return this; }
@Override public String toString() { return separator == ' ' ? " " : MessageFormatUtil.format(" {0} ", separator); } }
@Override public String toString() { return MessageFormatUtil.format(":prev*{0}", evaluator); } }
@Override public String toString() { return MessageFormatUtil.format("{0}={1}", key, value); } }
@Override public String toString() { return MessageFormatUtil.format(":matchesOwn({0}", pattern); } }