/** Test whether the instance represents serialized version of a class * or not. * @return true if the file entry extension is ser */ private boolean isSerialized () { return instanceOrigin ().getExt ().equals ("ser"); // NOI18N }
public String instanceName () { // XXX does this make any sense? Is this method useful for anything? String p = instanceOrigin().getPath(); int x = p.lastIndexOf('.'); if (x != -1 && x > p.lastIndexOf('/')) { p = p.substring(0, x); } return p.replace('/', '.'); }
if (isSerialized ()) { BufferedInputStream bis = new BufferedInputStream(instanceOrigin().getInputStream(), 1024); org.openide.util.io.NbObjectInputStream nbis = new org.openide.util.io.NbObjectInputStream(bis); Object o = nbis.readObject();
if (isSerialized ()) { // NOI18N InputStream is = instanceOrigin ().getInputStream (); try { clazz = readClass (is);