public static String decode(String original) { if (original == null || original.length() == 0) return original; boolean changedString = false; int copyTo = 0; // it will always be less than the original char[] chars = new char[original.length()]; StringCharacterIterator iter = new StringCharacterIterator(original); for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { if (c == '&') { changedString = true; copyTo = base64decode(chars, copyTo, iter); } else { chars[copyTo++] = c; } } // now create our string from the char array if (changedString) { return new String(chars, 0, copyTo); } else { return original; } }
public static String decode(String original) { if (original == null || original.length() == 0) return original; boolean changedString = false; int copyTo = 0; // it will always be less than the original char[] chars = new char[original.length()]; StringCharacterIterator iter = new StringCharacterIterator(original); for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { if (c == '&') { changedString = true; copyTo = base64decode(chars, copyTo, iter); } else { chars[copyTo++] = c; } } // now create our string from the char array if (changedString) { return new String(chars, 0, copyTo); } else { return original; } }
public static String decode(String original) { if (original == null || original.length() == 0) return original; boolean changedString = false; int copyTo = 0; // it will always be less than the original char[] chars = new char[original.length()]; StringCharacterIterator iter = new StringCharacterIterator(original); for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { if (c == '&') { changedString = true; copyTo = base64decode(chars, copyTo, iter); } else { chars[copyTo++] = c; } } // now create our string from the char array if (changedString) { return new String(chars, 0, copyTo); } else { return original; } }
public static String decode(String original) { if (original == null || original.length() == 0) return original; boolean changedString = false; int copyTo = 0; // it will always be less than the original char[] chars = new char[original.length()]; StringCharacterIterator iter = new StringCharacterIterator(original); for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { if (c == '&') { changedString = true; copyTo = base64decode(chars, copyTo, iter); } else { chars[copyTo++] = c; } } // now create our string from the char array if (changedString) { return new String(chars, 0, copyTo); } else { return original; } }
public static String decode(String original) { if (original == null || original.length() == 0) return original; boolean changedString = false; int copyTo = 0; // it will always be less than the original char[] chars = new char[original.length()]; StringCharacterIterator iter = new StringCharacterIterator(original); for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { if (c == '&') { changedString = true; copyTo = base64decode(chars, copyTo, iter); } else { chars[copyTo++] = c; } } // now create our string from the char array if (changedString) { return new String(chars, 0, copyTo); } else { return original; } }
public static String decode(String original) { if (original == null || original.length() == 0) return original; boolean changedString = false; int copyTo = 0; // it will always be less than the original char[] chars = new char[original.length()]; StringCharacterIterator iter = new StringCharacterIterator(original); for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { if (c == '&') { changedString = true; copyTo = base64decode(chars, copyTo, iter); } else { chars[copyTo++] = c; } } // now create our string from the char array if (changedString) { return new String(chars, 0, copyTo); } else { return original; } }
public static String decode(String original) { if (original == null || original.length() == 0) return original; boolean changedString = false; int copyTo = 0; // it will always be less than the original char[] chars = new char[original.length()]; StringCharacterIterator iter = new StringCharacterIterator(original); for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { if (c == '&') { changedString = true; copyTo = base64decode(chars, copyTo, iter); } else { chars[copyTo++] = c; } } // now create our string from the char array if (changedString) { return new String(chars, 0, copyTo); } else { return original; } }
public static String decode(String original) { if (original == null || original.length() == 0) return original; boolean changedString = false; int copyTo = 0; // it will always be less than the original char[] chars = new char[original.length()]; StringCharacterIterator iter = new StringCharacterIterator(original); for(char c = iter.first(); c != CharacterIterator.DONE; c = iter.next()) { if (c == '&') { changedString = true; copyTo = base64decode(chars, copyTo, iter); } else { chars[copyTo++] = c; } } // now create our string from the char array if (changedString) { return new String(chars, 0, copyTo); } else { return original; } }