return (Reader)transferObject;
} else if (transferObject instanceof String) {
return new StringReader((String)transferObject);
} else if (transferObject instanceof CharBuffer) {
CharBuffer buffer = (CharBuffer)transferObject;
int size = buffer.remaining();
char[] chars = new char[size];
buffer.get(chars, 0, size);
return new CharArrayReader(chars);
} else if (transferObject instanceof char[]) {
return new CharArrayReader((char[])transferObject);