Java Code Examples for com.codename1.io.Util#readUTF()
The following examples show how to use
com.codename1.io.Util#readUTF() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExternalizableParseObject.java From parse4cn1 with Apache License 2.0 | 6 votes |
/** * @see com.codename1.io.Externalizable */ public void internalize(int version, DataInputStream in) throws IOException { className = Util.readUTF(in); if (className != null) { parseObject = ParseObject.create(className); try { parseObject.internalize(version, in); } catch (ParseException ex) { Logger.getInstance().error( "An error occurred while trying to deserialize ParseObject"); throw new IOException(ex.getMessage()); } } else { final String msg = "Unable to deserialize ParseObject " + "(null class name). Is class properly registered?"; Logger.getInstance().error(msg); throw new RuntimeException(msg); } }
Example 2
Source File: ParseRelation.java From parse4cn1 with Apache License 2.0 | 5 votes |
/** * @see com.codename1.io.Externalizable */ public void internalize(int version, DataInputStream in) throws IOException { targetClass = Util.readUTF(in); key = Util.readUTF(in); arrayToSet((Object[]) Util.readObject(in), addedObjects); arrayToSet((Object[]) Util.readObject(in), removedObjects); }
Example 3
Source File: ParseUser.java From parse4cn1 with Apache License 2.0 | 5 votes |
/** * Deserializes ParseUser-specific data in addition to regular ParseObject data. * * @param version The version of the previously serialized object (defaults to {@link ParseConstants#API_VERSION}). * @param in The data input stream to deserialize from. * @throws IOException if any IO error occurs * @see ParseObject#internalize(int, java.io.DataInputStream) */ @Override public void internalize(int version, DataInputStream in) throws IOException, ParseException { super.internalize(version, in); sessionToken = Util.readUTF(in); password = Util.readUTF(in); current = ((Boolean) Util.readObject(in)) ? this : null; }
Example 4
Source File: ParseFile.java From parse4cn1 with Apache License 2.0 | 5 votes |
/** * @see com.codename1.io.Externalizable */ public void internalize(int version, DataInputStream in) throws IOException { setDirty(in.readBoolean()); endPoint = Util.readUTF(in); setName(Util.readUTF(in)); setUrl(Util.readUTF(in)); setContentType(Util.readUTF(in)); data = (byte[]) Util.readObject(in); }
Example 5
Source File: Message.java From codenameone-demos with GNU General Public License v2.0 | 5 votes |
@Override public void internalize(int version, DataInputStream in) throws IOException { time = in.readLong(); senderId = Util.readUTF(in); recepientId = Util.readUTF(in); picture = Util.readUTF(in); name = Util.readUTF(in); message = Util.readUTF(in); }
Example 6
Source File: CloudObject.java From CodenameOne with GNU General Public License v2.0 | 5 votes |
/** * {@inheritDoc} */ public void internalize(int version, DataInputStream in) throws IOException { cloudId = Util.readUTF(in); owner = in.readBoolean(); accessPermissions = in.readByte(); lastModified = in.readLong(); status = in.readInt(); values = (Hashtable)Util.readObject(in); }
Example 7
Source File: CachedData.java From CodenameOne with GNU General Public License v2.0 | 5 votes |
/** * {@inheritDoc} */ public void internalize(int version, DataInputStream in) throws IOException { url = Util.readUTF(in); etag = Util.readUTF(in); modified = Util.readUTF(in); data = new byte[in.readInt()]; in.readFully(data); }