cc.allocate(length, -1);
String enc = connector.getURIEncoding();
if (enc != null && !enc.isEmpty() &&
!Globals.ISO_8859_1_ENCODING.equalsIgnoreCase(enc)) {
B2CConverter conv = getURIConverter();
try {
if (conv == null) {
conv = new B2CConverter(enc);
setURIConverter(conv);
}
} catch (IOException e) {
// Ignore
log.log(Level.SEVERE, INVALID_URI_ENCODING);
connector.setURIEncoding(null);
}
if (conv != null) {
try {
conv.convert(bc, cc, cc.getBuffer().length - cc.getEnd());
uri.setChars(cc.getBuffer(), cc.getStart(),
cc.getLength());
return;
} catch (IOException e) {
log.log(Level.SEVERE, INVALID_URI_CHAR_ENCODING);