private String readEnumEntry(char c, HashMap sharedEnums) throws XMLStreamException { String id = readDTDNmtoken(c); /* Let's make sure it's shared for this DTD subset; saves memory * both for DTDs and resulting docs. Could also intern Strings? */ String sid = (String) sharedEnums.get(id); if (sid == null) { sid = id; if (INTERN_SHARED_NAMES) { /* 19-Nov-2004, TSa: Let's not use intern cache here... * shouldn't be performance critical (DTDs themselves * cached), and would add more entries to cache. */ sid = sid.intern(); } sharedEnums.put(sid, sid); } return sid; }
/** * Method called to resolve and initialize specified collected * namespace declaration * * @return Attribute that contains specified namespace declaration */ protected Attribute resolveNamespaceDecl(int index, boolean internURI) { Attribute ns = mNamespaces[index]; String full = mNamespaceBuilder.getAllValues(); String uri; if (mNsCount == 0) { uri = full; } else { ++index; if (index < mNsCount) { // not last int endOffset = mNamespaces[index].mValueStartOffset; uri = ns.getValue(full, endOffset); } else { // is last uri = ns.getValue(full); } } if (internURI && uri.length() > 0) { uri = sInternCache.intern(uri); } ns.mNamespaceURI = uri; return ns; }
uri = InternCache.getInstance().intern(uri);
private String readEnumEntry(char c, HashMap sharedEnums) throws XMLStreamException { String id = readDTDNmtoken(c); /* Let's make sure it's shared for this DTD subset; saves memory * both for DTDs and resulting docs. Could also intern Strings? */ String sid = (String) sharedEnums.get(id); if (sid == null) { sid = id; if (INTERN_SHARED_NAMES) { /* 19-Nov-2004, TSa: Let's not use intern cache here... * shouldn't be performance critical (DTDs themselves * cached), and would add more entries to cache. */ sid = sid.intern(); } sharedEnums.put(sid, sid); } return sid; }
private String readEnumEntry(char c, HashMap<String,String> sharedEnums) throws XMLStreamException { String id = readDTDNmtoken(c); /* Let's make sure it's shared for this DTD subset; saves memory * both for DTDs and resulting docs. Could also intern Strings? */ String sid = sharedEnums.get(id); if (sid == null) { sid = id; if (INTERN_SHARED_NAMES) { /* 19-Nov-2004, TSa: Let's not use intern cache here... * shouldn't be performance critical (DTDs themselves * cached), and would add more entries to cache. */ sid = sid.intern(); } sharedEnums.put(sid, sid); } return sid; }
private String readEnumEntry(char c, HashMap<String,String> sharedEnums) throws XMLStreamException { String id = readDTDNmtoken(c); /* Let's make sure it's shared for this DTD subset; saves memory * both for DTDs and resulting docs. Could also intern Strings? */ String sid = sharedEnums.get(id); if (sid == null) { sid = id; if (INTERN_SHARED_NAMES) { /* 19-Nov-2004, TSa: Let's not use intern cache here... * shouldn't be performance critical (DTDs themselves * cached), and would add more entries to cache. */ sid = sid.intern(); } sharedEnums.put(sid, sid); } return sid; }
private String readEnumEntry(char c, HashMap sharedEnums) throws IOException, XMLStreamException { String id = readDTDNmtoken(c); /* Let's make sure it's shared for this DTD subset; saves memory * both for DTDs and resulting docs. Could also intern Strings? */ String sid = (String) sharedEnums.get(id); if (sid == null) { sid = id; if (INTERN_SHARED_NAMES) { /* 19-Nov-2004, TSa: Let's not use intern cache here... * shouldn't be performance critical (DTDs themselves * cached), and would add more entries to cache. */ sid = sid.intern(); } sharedEnums.put(sid, sid); } return sid; }
private String readEnumEntry(char c, HashMap sharedEnums) throws IOException, XMLStreamException { String id = readDTDNmtoken(c); /* Let's make sure it's shared for this DTD subset; saves memory * both for DTDs and resulting docs. Could also intern Strings? */ String sid = (String) sharedEnums.get(id); if (sid == null) { sid = id; if (INTERN_SHARED_NAMES) { /* 19-Nov-2004, TSa: Let's not use intern cache here... * shouldn't be performance critical (DTDs themselves * cached), and would add more entries to cache. */ sid = sid.intern(); } sharedEnums.put(sid, sid); } return sid; }
private String readEnumEntry(char c, HashMap sharedEnums) throws IOException, XMLStreamException { String id = readDTDNmtoken(c); /* Let's make sure it's shared for this DTD subset; saves memory * both for DTDs and resulting docs. Could also intern Strings? */ String sid = (String) sharedEnums.get(id); if (sid == null) { sid = id; if (INTERN_SHARED_NAMES) { /* 19-Nov-2004, TSa: Let's not use intern cache here... * shouldn't be performance critical (DTDs themselves * cached), and would add more entries to cache. */ sid = sid.intern(); } sharedEnums.put(sid, sid); } return sid; }
private String readEnumEntry(char c, HashMap<String,String> sharedEnums) throws XMLStreamException { String id = readDTDNmtoken(c); /* Let's make sure it's shared for this DTD subset; saves memory * both for DTDs and resulting docs. Could also intern Strings? */ String sid = sharedEnums.get(id); if (sid == null) { sid = id; if (INTERN_SHARED_NAMES) { /* 19-Nov-2004, TSa: Let's not use intern cache here... * shouldn't be performance critical (DTDs themselves * cached), and would add more entries to cache. */ sid = sid.intern(); } sharedEnums.put(sid, sid); } return sid; }
prefix = ""; prefix = ic.intern(prefix); ies.addNsBinding(prefix, att.getNodeValue()); storedNamespaces.put(nodeName, att.getNodeValue());
prefix = ""; prefix = ic.intern(prefix); ies.addNsBinding(prefix, att.getNodeValue()); storedNamespaces.put(nodeName, att.getNodeValue());
/** * Method called to resolve and initialize specified collected * namespace declaration * * @return Attribute that contains specified namespace declaration */ protected Attribute resolveNamespaceDecl(int index, boolean internURI) { Attribute ns = mNamespaces[index]; String full = mNamespaceBuilder.getAllValues(); String uri; if (mNsCount == 0) { uri = full; } else { ++index; if (index < mNsCount) { // not last int endOffset = mNamespaces[index].mValueStartOffset; uri = ns.getValue(full, endOffset); } else { // is last uri = ns.getValue(full); } } if (internURI && uri.length() > 0) { uri = sInternCache.intern(uri); } ns.mNamespaceURI = uri; return ns; }
/** * Method called to resolve and initialize specified collected * namespace declaration * * @return Attribute that contains specified namespace declaration */ protected Attribute resolveNamespaceDecl(int index, boolean internURI) { Attribute ns = mNamespaces[index]; String full = mNamespaceBuilder.getAllValues(); String uri; if (mNsCount == 0) { uri = full; } else { ++index; if (index < mNsCount) { // not last int endOffset = mNamespaces[index].mValueStartOffset; uri = ns.getValue(full, endOffset); } else { // is last uri = ns.getValue(full); } } if (internURI && uri.length() > 0) { uri = sInternCache.intern(uri); } ns.mNamespaceURI = uri; return ns; }
/** * Method called to resolve and initialize specified collected * namespace declaration * * @return Attribute that contains specified namespace declaration */ protected Attribute resolveNamespaceDecl(int index, boolean internURI) { Attribute ns = mNamespaces[index]; String full = mNamespaceBuilder.getAllValues(); String uri; if (mNsCount == 0) { uri = full; } else { ++index; if (index < mNsCount) { // not last int endOffset = mNamespaces[index].mValueStartOffset; uri = ns.getValue(full, endOffset); } else { // is last uri = ns.getValue(full); } } if (internURI && uri.length() > 0) { uri = sInternCache.intern(uri); } ns.mNamespaceURI = uri; return ns; }
/** * Method called to resolve and initialize specified collected * namespace declaration * * @return Attribute that contains specified namespace declaration */ protected Attribute resolveNamespaceDecl(int index, boolean internURI) { Attribute ns = mNamespaces[index]; String full = mNamespaceBuilder.getAllValues(); String uri; if (mNsCount == 0) { uri = full; } else { ++index; if (index < mNsCount) { // not last int endOffset = mNamespaces[index].mValueStartOffset; uri = ns.getValue(full, endOffset); } else { // is last uri = ns.getValue(full); } } if (internURI && uri.length() > 0) { uri = sInternCache.intern(uri); } ns.mNamespaceURI = uri; return ns; }
uri = InternCache.getInstance().intern(uri);
uri = InternCache.getInstance().intern(uri);
uri = InternCache.getInstance().intern(uri);
uri = InternCache.getInstance().intern(uri);