List of usage examples for java.io ObjectOutputStream writeBoolean
public void writeBoolean(boolean val) throws IOException
From source file:org.opendas.calendar.Settings.java
/** * Save GUI settings//w w w . j a va 2s. co m * * @param x * x position of main frame on screen * @param y * y position of main frame on screen * @param width * main frame width * @param sh * slot height * @param dh * main frame decoration height * @param nor_hours * number of rendered hours * @param eview * false - simple view, true - extended view<br> * @param rl * false - don't show row labels, true - show it<br> * */ public void save_gui_settings(int x, int y, int width, int sh, int dh, long nor_hours, boolean eview, boolean rl) { frame_x = x; frame_y = y; frame_width = width; slot_height = sh; decor_height = dh; number_of_rendered_hours = nor_hours; ext_view = eview; show_row_labels = rl; try { new File(gui_settings_file_name).delete(); ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(gui_settings_file_name)); out.writeInt(x); out.writeInt(y); out.writeInt(width); out.writeInt(sh); out.writeInt(dh); out.writeLong(nor_hours); out.writeBoolean(eview); out.writeBoolean(rl); out.close(); } catch (Exception b) { b.printStackTrace(); } }
From source file:org.protempa.proposition.UniqueId.java
private void writeObject(ObjectOutputStream s) throws IOException { boolean derived = (this.sourceId instanceof DerivedSourceId); s.writeBoolean(derived); if (!derived) { s.writeObject(this.sourceId.getId()); }/*from w w w . j ava 2 s . c om*/ s.writeObject(this.localUniqueId); }
From source file:org.protempa.proposition.value.BooleanValue.java
private void writeObject(ObjectOutputStream s) throws IOException { s.writeBoolean(this.val); }
From source file:org.sakaiproject.portal.render.portlet.services.state.PortletState.java
private void writeObject(ObjectOutputStream out) throws IOException { if (LOG.isDebugEnabled()) { LOG.debug("Serializing PortletState [action=" + action + "]"); }//from ww w. jav a 2 s.co m out.writeObject(id); out.writeBoolean(action); out.writeBoolean(secure); out.writeObject(parameters); out.writeObject(portletMode.toString()); out.writeObject(windowState.toString()); }
From source file:org.spout.api.inventory.ItemStack.java
private void writeObject(java.io.ObjectOutputStream out) throws IOException { out.writeShort(material.getId());//w ww . j a va 2 s . com out.writeShort(material.getData()); out.writeInt(amount); out.writeShort(data); byte[] auxData = this.auxData.serialize(); if (auxData != null) { out.writeInt(auxData.length); out.write(auxData); } else { out.writeInt(0); } if (nbtData != null && !nbtData.isEmpty()) { out.writeBoolean(true); NBTOutputStream os = new NBTOutputStream(out, false); os.writeTag(new CompoundTag("nbtData", nbtData)); os.close(); } else { out.writeBoolean(false); } }
From source file:pl.otros.logview.accept.query.org.apache.log4j.rule.MarkEqualsRule.java
/** * Serialize the state of the object./*from w ww. j av a 2 s. c o m*/ * * @param out * object output stream * @throws IOException * if IO error during serialization */ private void writeObject(final java.io.ObjectOutputStream out) throws IOException { out.writeBoolean(useOnOffSwith); out.writeObject(markerColors); }
From source file:webplugin.WebAddress.java
public void writeData(ObjectOutputStream out) throws IOException { out.writeInt(3);/*from w ww .j a v a2s. c om*/ out.writeObject(mName); out.writeObject(mIconFileName); out.writeObject(mUrl); out.writeBoolean(mUserEntry); out.writeBoolean(mActive); }
From source file:xbird.engine.remote.RemoteFocusProxy.java
private void fetchTo(int atleast, OutputStream os) throws IOException { if (atleast < 1) { throw new IllegalArgumentException("Illegal fetch size: " + atleast); }//ww w . j a va 2 s. com final ObjectOutputStream oos = new ObjectOutputStream(os); final IFocus<Item> delegate = _delegate; for (int i = 0;; i++) { if (!delegate.hasNext()) { oos.writeBoolean(false /* hasNext */); if (i == 0) { oos.flush(); synchronized (this) { notify(); } } break; } Item result = delegate.next(); oos.writeBoolean(true /* hasNext */); oos.writeObject(result); if (i == atleast) { synchronized (this) { notify(); } oos.flush(); // enforce send the first item as soon as possible } } oos.flush(); oos.close(); }