/** Saves pool to stream by saving all filesystems. * The default (system) filesystem, or any persistent filesystems, are skipped. * * @param oos object output stream * @exception IOException if an error occures * @deprecated Unused. */ @Deprecated public final synchronized void writeExternal(ObjectOutput oos) throws IOException { Iterator iter = fileSystems.iterator(); while (iter.hasNext()) { FileSystem fs = (FileSystem) iter.next(); if (!fs.isDefault() && !fs.isPersistent()) { oos.writeObject(new NbMarshalledObject(fs)); } } oos.writeObject(null); }
/** Reads external. */ public void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException { for (;;) { String file = (String) oi.readObject(); if (file == null) { break; } for (;;) { String attr = (String) oi.readObject(); if (attr == null) { break; } Object o = oi.readObject(); // backward compatibility if (o instanceof java.rmi.MarshalledObject) { o = ((java.rmi.MarshalledObject) o).get(); o = new NbMarshalledObject(o); } // end of backward compatibility if (o instanceof NbMarshalledObject) { setAttr(file, attr, o); } } } } }
org.openide.util.io.NbMarshalledObject m = new org.openide.util.io.NbMarshalledObject(this);
org.openide.util.io.NbMarshalledObject m = new org.openide.util.io.NbMarshalledObject(this);
/** Stores the manager */ public void writeExternal (ObjectOutput oo) throws IOException { super.writeExternal (oo); oo.writeObject (new NbMarshalledObject (manager)); }
/** Stores the manager */ public void writeExternal (ObjectOutput oo) throws IOException { super.writeExternal (oo); oo.writeObject (new NbMarshalledObject (manager)); }
/** Write the object down. */ private void writeObject (ObjectOutputStream oos) throws IOException { Enumeration en = services (); while (en.hasMoreElements ()) { ServiceType s = (ServiceType)en.nextElement (); NbMarshalledObject obj; try { obj = new NbMarshalledObject (s); } catch (IOException ex) { Logger.getLogger(Services.class.getName()).log(Level.WARNING, null, ex); // skip the object if it cannot be serialized obj = null; } if (obj != null) { oos.writeObject (obj); } } oos.writeObject (null); }
/** Called from {@link #clone} to actually create a new component from this one. * The default implementation only clones the object by calling {@link Object#clone}. * Subclasses may leave this as is, assuming they have no special needs for the cloned * data besides copying it from one object to the other. If they do, the superclass * method should be called, and the returned object modified appropriately. * @return a copy of this object */ protected CloneableTopComponent createClonedObject () { try { // clones the component using serialization NbMarshalledObject o = new NbMarshalledObject (this); CloneableTopComponent top = (CloneableTopComponent)o.get (); return top; } catch (IOException ex) { ex.printStackTrace(); throw new InternalError (); } catch (ClassNotFoundException ex) { ex.printStackTrace(); throw new InternalError (); } }
/** Saves pool to stream by saving all filesystems. * The default (system) filesystem, or any persistent filesystems, are skipped. * * @param oos object output stream * @exception IOException if an error occures * @deprecated Unused. */ public final synchronized void writeExternal (ObjectOutput oos) throws IOException { Iterator iter = fileSystems.iterator(); while (iter.hasNext()) { FileSystem fs = (FileSystem)iter.next(); if (!fs.isDefault () && !fs.isPersistent ()) { oos.writeObject (new NbMarshalledObject (fs)); } } oos.writeObject (null); }
/** Saves pool to stream by saving all filesystems. * The default (system) filesystem, or any persistent filesystems, are skipped. * * @param oos object output stream * @exception IOException if an error occures * @deprecated Unused. */ public final synchronized void writeExternal (ObjectOutput oos) throws IOException { Iterator iter = fileSystems.iterator(); while (iter.hasNext()) { FileSystem fs = (FileSystem)iter.next(); if (!fs.isDefault () && !fs.isPersistent ()) { oos.writeObject (new NbMarshalledObject (fs)); } } oos.writeObject (null); }
/** Called from {@link #clone} to actually create a new component from this one. * The default implementation only clones the object by calling {@link Object#clone}. * Subclasses may leave this as is, assuming they have no special needs for the cloned * data besides copying it from one object to the other. If they do, the superclass * method should be called, and the returned object modified appropriately. * @return a copy of this object */ protected CloneableTopComponent createClonedObject () { try { // clones the component using serialization NbMarshalledObject o = new NbMarshalledObject (this); CloneableTopComponent top = (CloneableTopComponent)o.get (); return top; } catch (IOException ex) { ex.printStackTrace(); throw new InternalError (); } catch (ClassNotFoundException ex) { ex.printStackTrace(); throw new InternalError (); } }
/** Reads external. */ public void readExternal (ObjectInput oi) throws IOException, ClassNotFoundException { for (;;) { String file = (String)oi.readObject (); if (file == null) break; for (;;) { String attr = (String)oi.readObject (); if (attr == null) break; Object o = oi.readObject (); // backward compatibility if (o instanceof java.rmi.MarshalledObject) { o = ((java.rmi.MarshalledObject)o).get (); o = new NbMarshalledObject (o); } // end of backward compatibility if (o instanceof NbMarshalledObject) { setAttr (file, attr, o); } } } }
public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); Object objects[] = getBeanContext().toArray(); Arrays.sort(objects,new ClassComparator()); for (int i = 0 ; i < objects.length ; i++) { out.writeObject(new NbMarshalledObject (objects[i])); } out.writeObject (null); }
/** Reads external. */ public void readExternal (ObjectInput oi) throws IOException, ClassNotFoundException { for (;;) { String file = (String)oi.readObject (); if (file == null) break; for (;;) { String attr = (String)oi.readObject (); if (attr == null) break; Object o = oi.readObject (); // backward compatibility if (o instanceof java.rmi.MarshalledObject) { o = ((java.rmi.MarshalledObject)o).get (); o = new NbMarshalledObject (o); } // end of backward compatibility if (o instanceof NbMarshalledObject) { setAttr (file, attr, o); } } } }
public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); Object objects[] = getBeanContext().toArray(); Arrays.sort(objects,new ClassComparator()); for (int i = 0 ; i < objects.length ; i++) { out.writeObject(new NbMarshalledObject (objects[i])); } out.writeObject (null); }
org.openide.util.io.NbMarshalledObject m = new org.openide.util.io.NbMarshalledObject(this);
obj = new NbMarshalledObject (l); } catch (IOException ex) { err.log(Level.WARNING, null, ex); obj = new NbMarshalledObject (l); } catch (IOException ex) { err.log(Level.WARNING, null, ex);
org.openide.util.io.NbMarshalledObject m = new org.openide.util.io.NbMarshalledObject(this);
org.openide.util.io.NbMarshalledObject m = new org.openide.util.io.NbMarshalledObject (this); return (ServiceType)m.get (); } catch (IOException ex) {
org.openide.util.io.NbMarshalledObject m = new org.openide.util.io.NbMarshalledObject (this); return (ServiceType)m.get (); } catch (IOException ex) {