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);
}
} else {
NSLog.err.appendln("RemoteBrowseClient _getFileListOutOfResponse Error decoding null response");
throw new MonitorException("Host returned null response for path " + thePath);
}
String isRoots = aResponse.headerForKey("isRoots");
String filepath = aResponse.headerForKey("filepath");