当前位置: 首页>>代码示例>>Java>>正文


Java Util.readUTF方法代码示例

本文整理汇总了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);
    }
}
 
开发者ID:sidiabale,项目名称:parse4cn1,代码行数:23,代码来源:ExternalizableParseObject.java

示例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;
    }
}
 
开发者ID:martijn00,项目名称:MusicPlayerCodenameOne,代码行数:19,代码来源:UserProfile.java

示例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);
}
 
开发者ID:sidiabale,项目名称:parse4cn1,代码行数:10,代码来源:ParseRelation.java

示例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;
}
 
开发者ID:sidiabale,项目名称:parse4cn1,代码行数:17,代码来源:ParseUser.java

示例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);
}
 
开发者ID:sidiabale,项目名称:parse4cn1,代码行数:12,代码来源:ParseFile.java

示例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);
}
 
开发者ID:codenameone,项目名称:codenameone-demos,代码行数:10,代码来源:Message.java

示例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);
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:12,代码来源:CloudObject.java

示例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);
}
 
开发者ID:codenameone,项目名称:CodenameOne,代码行数:11,代码来源:CachedData.java


注:本文中的com.codename1.io.Util.readUTF方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。