本文整理汇总了Java中com.codename1.io.Util.readUTF方法的典型用法代码示例。如果您正苦于以下问题:Java Util.readUTF方法的具体用法?Java Util.readUTF怎么用?Java Util.readUTF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.codename1.io.Util
的用法示例。
在下文中一共展示了Util.readUTF方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: internalize
import com.codename1.io.Util; //导入方法依赖的package包/类
/**
* @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);
}
}
示例2: internalize
import com.codename1.io.Util; //导入方法依赖的package包/类
@Override
public void internalize(int version, DataInputStream in) throws IOException {
switch (version) {
case 3:
username = Util.readUTF(in);
token = Util.readUTF(in);
firstName = Util.readUTF(in);
lastName = Util.readUTF(in);
languages = (ArrayList<String>)Util.readObject(in);
break;
case 2:
firstName = Util.readUTF(in);
lastName = Util.readUTF(in);
languages = (ArrayList<String>)Util.readObject(in);
break;
}
}
示例3: internalize
import com.codename1.io.Util; //导入方法依赖的package包/类
/**
* @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);
}
示例4: internalize
import com.codename1.io.Util; //导入方法依赖的package包/类
/**
* 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;
}
示例5: internalize
import com.codename1.io.Util; //导入方法依赖的package包/类
/**
* @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);
}
示例6: internalize
import com.codename1.io.Util; //导入方法依赖的package包/类
@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);
}
示例7: internalize
import com.codename1.io.Util; //导入方法依赖的package包/类
/**
* {@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);
}
示例8: internalize
import com.codename1.io.Util; //导入方法依赖的package包/类
/**
* {@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);
}