List of usage examples for java.io ObjectInputStream readBoolean
public boolean readBoolean() throws IOException
From source file:BooleanArrayList.java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject();/* w w w . j ava2 s .c o m*/ array = new boolean[in.readInt()]; for (int i = 0; i < size; i++) { array[i] = in.readBoolean(); } }
From source file:com.blazeroni.reddit.http.SerializableCookie.java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { String name = (String) in.readObject(); String value = (String) in.readObject(); BasicClientCookie c = new BasicClientCookie(name, value); c.setComment((String) in.readObject()); c.setDomain((String) in.readObject()); c.setExpiryDate((Date) in.readObject()); c.setPath((String) in.readObject()); c.setVersion(in.readInt());//from ww w . j a v a 2s . co m c.setSecure(in.readBoolean()); this.cookie = c; }
From source file:com.inmobi.grill.driver.hive.TestRemoteHiveDriver.java
private QueryContext readContext(byte[] bytes, GrillDriver driver) throws IOException, ClassNotFoundException { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); ObjectInputStream in = new ObjectInputStream(bais); QueryContext ctx;//from w w w. ja v a2s. c o m try { ctx = (QueryContext) in.readObject(); boolean driverAvailable = in.readBoolean(); if (driverAvailable) { String clsName = in.readUTF(); ctx.setSelectedDriver(driver); } } finally { in.close(); bais.close(); } return ctx; }
From source file:cn.com.loopj.android.http.SerializableCookie.java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { String key = (String) in.readObject(); String value = (String) in.readObject(); clientCookie = new BasicClientCookie(key, value); clientCookie.setComment((String) in.readObject()); clientCookie.setDomain((String) in.readObject()); clientCookie.setExpiryDate((Date) in.readObject()); clientCookie.setPath((String) in.readObject()); clientCookie.setVersion(in.readInt()); clientCookie.setSecure(in.readBoolean()); }
From source file:cn.caimatou.canting.utils.http.asynchttp.SerializableCookie.java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { String name = (String) in.readObject(); String value = (String) in.readObject(); clientCookie = new BasicClientCookie(name, value); clientCookie.setComment((String) in.readObject()); clientCookie.setDomain((String) in.readObject()); clientCookie.setExpiryDate((Date) in.readObject()); clientCookie.setPath((String) in.readObject()); clientCookie.setVersion(in.readInt()); clientCookie.setSecure(in.readBoolean()); }
From source file:com.lillicoder.newsblurry.net.SerializableCookie.java
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { // Read all values from write operation in order. String comment = (String) in.readObject(); String domain = (String) in.readObject(); Date expiryDate = (Date) in.readObject(); String name = (String) in.readObject(); String path = (String) in.readObject(); String value = (String) in.readObject(); int version = in.readInt(); boolean isSecure = in.readBoolean(); // Create a new basic cookie and set this wrapper's cookie instance. BasicClientCookie cookie = new BasicClientCookie(name, value); cookie.setComment(comment);/*from ww w . java2 s .c o m*/ cookie.setDomain(domain); cookie.setExpiryDate(expiryDate); cookie.setPath(path); cookie.setValue(value); cookie.setVersion(version); cookie.setSecure(isSecure); this.setCookie(cookie); }
From source file:com.ab.http.SerializableCookie.java
/** * Read object./* w w w . ja v a 2s. c om*/ * * @param in the in * @throws IOException Signals that an I/O exception has occurred. * @throws ClassNotFoundException the class not found exception */ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { String name = (String) in.readObject(); String value = (String) in.readObject(); clientCookie = new BasicClientCookie(name, value); clientCookie.setComment((String) in.readObject()); clientCookie.setDomain((String) in.readObject()); clientCookie.setExpiryDate((Date) in.readObject()); clientCookie.setPath((String) in.readObject()); clientCookie.setVersion(in.readInt()); clientCookie.setSecure(in.readBoolean()); }
From source file:net.vleu.par.android.rpc.SerializableCookie.java
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException { final String name = (String) in.readObject(); final String value = (String) in.readObject(); this.clientCookie = new BasicClientCookie(name, value); this.clientCookie.setComment((String) in.readObject()); this.clientCookie.setDomain((String) in.readObject()); this.clientCookie.setExpiryDate((Date) in.readObject()); this.clientCookie.setPath((String) in.readObject()); this.clientCookie.setVersion(in.readInt()); this.clientCookie.setSecure(in.readBoolean()); }
From source file:ti.modules.titanium.network.TiCookieStore.java
private Cookie decodeCookie(String cookieString) { byte[] cookieBytes = hexStringToByteArray(cookieString); ByteArrayInputStream inputStream = new ByteArrayInputStream(cookieBytes); BasicClientCookie cookie = null;/* ww w . j a v a 2 s.c o m*/ try { ObjectInputStream objectInputStream = new ObjectInputStream(inputStream); String name = (String) objectInputStream.readObject(); String value = (String) objectInputStream.readObject(); cookie = new BasicClientCookie(name, value); cookie.setComment((String) objectInputStream.readObject()); cookie.setDomain((String) objectInputStream.readObject()); cookie.setVersion(objectInputStream.readInt()); cookie.setSecure(objectInputStream.readBoolean()); cookie.setExpiryDate((Date) objectInputStream.readObject()); cookie.setPath((String) objectInputStream.readObject()); } catch (Exception e) { Log.w(TAG, "Failed to decode cookie", Log.DEBUG_MODE); return null; } return cookie; }
From source file:net.sf.maltcms.chromaui.annotations.XYSelectableShapeAnnotation.java
/** * Provides serialization support./*from w w w . jav a 2 s . c om*/ * * @param stream the input stream. * * @throws IOException if there is an I/O error. * @throws ClassNotFoundException if there is a classpath problem. */ private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.s = SerialUtilities.readShape(stream); this.stroke = SerialUtilities.readStroke(stream); this.outline = SerialUtilities.readPaint(stream); this.highlight = SerialUtilities.readPaint(stream); this.active = stream.readBoolean(); }