public RemoteBrowseClient(WOContext aWocontext) {
super(aWocontext);
}
static public NSDictionary _getFileListOutOfResponse(WOResponse aResponse, String thePath) throws MonitorException {
NSData responseContent = aResponse.content();
NSArray anArray = NSArray.EmptyArray;
if (responseContent != null) {
byte[] responseContentBytes = responseContent.bytes();
String responseContentString = new String(responseContentBytes);
if (responseContentString.startsWith("ERROR")) {
throw new MonitorException("Path " + thePath + " does not exist");
}
_JavaMonitorDecoder aDecoder = new _JavaMonitorDecoder();
try {
byte[] evilHackCombined = new byte[responseContentBytes.length + evilHack.length];
// System.arraycopy(src, src_pos, dst, dst_pos, length);
System.arraycopy(evilHack, 0, evilHackCombined, 0, evilHack.length);
System.arraycopy(responseContentBytes, 0, evilHackCombined, evilHack.length,
responseContentBytes.length);
anArray = (NSArray) aDecoder.decodeRootObject(new NSData(evilHackCombined));
} catch (WOXMLException wxe) {
NSLog.err.appendln("RemoteBrowseClient _getFileListOutOfResponse Error decoding response: "
+ responseContentString);
throw new MonitorException("Host returned bad response for path " + thePath);
}