//int greenPixel = image.getImageData().palette.getPixel(new RGB(0,255,0));
boolean canRead = true;
boolean canWrite = true;
if (element instanceof RemoteFile) {
RemoteFile file = (RemoteFile)element;
canRead = file.canRead();
canWrite = file.canWrite();
}
else if (element instanceof File) {
File file = (File)element;
canRead = file.canRead();