public String toString(PropertyIDMap idMap) { final StringBuilder b = new StringBuilder(); final Property[] pa = getProperties(); b.append("\n\n\n"); b.append(getClass().getName()); b.append('['); b.append("formatID: "); b.append(getFormatID()); b.append(", offset: "); b.append(getOffset()); b.append(", propertyCount: "); b.append(getPropertyCount()); b.append(", size: "); b.append(getSize()); b.append(", properties: [\n"); int codepage = getCodepage(); if (codepage == -1) { codepage = Property.DEFAULT_CODEPAGE; } for (Property p : pa) { b.append(p.toString(codepage, idMap)); b.append(",\n"); } b.append(']'); b.append(']'); return b.toString(); }
int cp = getCodepage(); if (cp == -1) { setCodepage(Property.DEFAULT_CODEPAGE);
int codepage = getCodepage(); if (codepage == -1) { String msg =
/** * Sets the custom properties. * * @param customProperties The custom properties */ public void setCustomProperties(final CustomProperties customProperties) { ensureSection2(); final Section section = getSections().get(1); final Map<Long,String> dictionary = customProperties.getDictionary(); // section.clear(); /* Set the codepage. If both custom properties and section have a * codepage, the codepage from the custom properties wins, else take the * one that is defined. If none is defined, take ISO-8859-1. */ int cpCodepage = customProperties.getCodepage(); if (cpCodepage < 0) { cpCodepage = section.getCodepage(); } if (cpCodepage < 0) { cpCodepage = Property.DEFAULT_CODEPAGE; } customProperties.setCodepage(cpCodepage); section.setCodepage(cpCodepage); section.setDictionary(dictionary); for (CustomProperty p : customProperties.properties()) { section.setProperty(p); } }
public String toString(PropertyIDMap idMap) { final StringBuilder b = new StringBuilder(); final Property[] pa = getProperties(); b.append("\n\n\n"); b.append(getClass().getName()); b.append('['); b.append("formatID: "); b.append(getFormatID()); b.append(", offset: "); b.append(getOffset()); b.append(", propertyCount: "); b.append(getPropertyCount()); b.append(", size: "); b.append(getSize()); b.append(", properties: [\n"); int codepage = getCodepage(); if (codepage == -1) { codepage = Property.DEFAULT_CODEPAGE; } for (Property p : pa) { b.append(p.toString(codepage, idMap)); b.append(",\n"); } b.append(']'); b.append(']'); return b.toString(); }
int cp = getCodepage(); if (cp == -1) { setCodepage(Property.DEFAULT_CODEPAGE);
int codepage = getCodepage(); if (codepage == -1) { String msg =
Section s = (Section) os; System.out.println("ss# fid: "+s.getFormatID()); System.out.println("ss# codepage: "+s.getCodepage()); System.out.println("ss# # properties: "+s.getPropertyCount()); for( Property sp : s.getProperties() ) {
Section s = (Section) os; System.out.println("ss# fid: "+s.getFormatID()); System.out.println("ss# codepage: "+s.getCodepage()); System.out.println("ss# # properties: "+s.getPropertyCount()); for( Property sp : s.getProperties() ) {
/** * Sets the custom properties. * * @param customProperties The custom properties */ public void setCustomProperties(final CustomProperties customProperties) { ensureSection2(); final Section section = getSections().get(1); final Map<Long,String> dictionary = customProperties.getDictionary(); // section.clear(); /* Set the codepage. If both custom properties and section have a * codepage, the codepage from the custom properties wins, else take the * one that is defined. If none is defined, take ISO-8859-1. */ int cpCodepage = customProperties.getCodepage(); if (cpCodepage < 0) { cpCodepage = section.getCodepage(); } if (cpCodepage < 0) { cpCodepage = Property.DEFAULT_CODEPAGE; } customProperties.setCodepage(cpCodepage); section.setCodepage(cpCodepage); section.setDictionary(dictionary); for (CustomProperty p : customProperties.properties()) { section.setProperty(p); } }