Example usage for com.itextpdf.text.pdf.codec Base64 encodeObject

List of usage examples for com.itextpdf.text.pdf.codec Base64 encodeObject

Introduction

In this page you can find the example usage for com.itextpdf.text.pdf.codec Base64 encodeObject.

Prototype

public static String encodeObject(java.io.Serializable serializableObject) 

Source Link

Document

Serializes an object and returns the Base64-encoded version of that serialized object.

Usage

From source file:org.scantegrity.common.SymbolRow.java

License:Open Source License

public String toString() {
    StringBuffer ret = new StringBuffer("");

    ret.append("\t\t\t<symbol id=\"" + getId() + "\"");
    if (salt != null) {
        ret.append(" " + saltAttr + "=\"" + new String(Base64.encodeObject(salt)) + "\"");
    }// w  ww  .ja  v  a 2s  .c  o  m
    if (code != null) {
        ret.append(" " + codeAttr + "=\"" + code + "\"");
    }
    if (commitment != null) {
        ret.append(" " + commitmentAttr + "=\"" + new String(Base64.encodeObject(commitment)) + "\"");
    }
    ret.append("/>\n");
    return ret.toString();
}