public boolean decode(Env env, String encoded)
{
ArrayValue array = getArray();
try {
UnserializeReader is = new UnserializeReader(encoded);
StringBuilder sb = new StringBuilder();
synchronized (array) {
while (true) {
int ch;
sb.setLength(0);
while ((ch = is.read()) > 0 && ch != '|') {
sb.append((char) ch);
}
if (sb.length() == 0)
return true;
String key = sb.toString();
array.put(env.createStringOld(key), is.unserialize(env));
}
}
} catch (IOException e) {
throw new QuercusModuleException(e);
}