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


Java ObjectInputStream.readLong方法代码示例

本文整理汇总了Java中java.io.ObjectInputStream.readLong方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectInputStream.readLong方法的具体用法?Java ObjectInputStream.readLong怎么用?Java ObjectInputStream.readLong使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.io.ObjectInputStream的用法示例。


在下文中一共展示了ObjectInputStream.readLong方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readObject

import java.io.ObjectInputStream; //导入方法依赖的package包/类
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
{
    String name = (String) in.readObject();
    String value = (String) in.readObject();
    long expiresAt = in.readLong();
    String domain = (String) in.readObject();
    String path = (String) in.readObject();
    boolean secure = in.readBoolean();
    boolean httpOnly = in.readBoolean();
    boolean hostOnly = in.readBoolean();
    boolean persistent = in.readBoolean();
    Cookie.Builder builder = new Cookie.Builder();
    builder = builder.name(name);
    builder = builder.value(value);
    builder = builder.expiresAt(expiresAt);
    builder = hostOnly ? builder.hostOnlyDomain(domain) : builder.domain(domain);
    builder = builder.path(path);
    builder = secure ? builder.secure() : builder;
    builder = httpOnly ? builder.httpOnly() : builder;
    clientCookie = builder.build();

}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:23,代码来源:SerializableHttpCookie.java

示例2: readObject

import java.io.ObjectInputStream; //导入方法依赖的package包/类
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    String name = (String) in.readObject();
    String value = (String) in.readObject();
    long expiresAt = in.readLong();
    String domain = (String) in.readObject();
    String path = (String) in.readObject();
    boolean secure = in.readBoolean();
    boolean httpOnly = in.readBoolean();
    boolean hostOnly = in.readBoolean();
    boolean persistent = in.readBoolean();
    Cookie.Builder builder = new Cookie.Builder();
    builder = builder.name(name);
    builder = builder.value(value);
    builder = builder.expiresAt(expiresAt);
    builder = hostOnly ? builder.hostOnlyDomain(domain) : builder.domain(domain);
    builder = builder.path(path);
    builder = secure ? builder.secure() : builder;
    builder = httpOnly ? builder.httpOnly() : builder;
    clientCookie = builder.build();
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:22,代码来源:SerializableCookie.java

示例3: readObject

import java.io.ObjectInputStream; //导入方法依赖的package包/类
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    String name = (String) in.readObject();
    String value = (String) in.readObject();
    long expiresAt = in.readLong();
    String domain = (String) in.readObject();
    String path = (String) in.readObject();
    boolean secure = in.readBoolean();
    boolean httpOnly = in.readBoolean();
    boolean hostOnly = in.readBoolean();
    boolean persistent = in.readBoolean();
    Cookie.Builder builder = new Cookie.Builder();
    builder = builder.name(name);
    builder = builder.value(value);
    builder = builder.expiresAt(expiresAt);
    builder = hostOnly ? builder.hostOnlyDomain(domain) : builder.domain(domain);
    builder = builder.path(path);
    builder = secure ? builder.secure() : builder;
    builder = httpOnly ? builder.httpOnly() : builder;
    clientCookie = builder.build();
}
 
开发者ID:angcyo,项目名称:RLibrary,代码行数:21,代码来源:SerializableHttpCookie.java

示例4: readObject

import java.io.ObjectInputStream; //导入方法依赖的package包/类
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    String name = (String) in.readObject();
    String value = (String) in.readObject();
    long expiresAt = in.readLong();
    String domain = (String) in.readObject();
    String path = (String) in.readObject();
    boolean secure = in.readBoolean();
    boolean httpOnly = in.readBoolean();
    boolean hostOnly = in.readBoolean();
    boolean persistent = in.readBoolean();
    Cookie.Builder builder = new Cookie.Builder();
    builder = builder.name(name);
    builder = builder.value(value);
    builder = builder.expiresAt(expiresAt);
    builder = hostOnly ? builder.hostOnlyDomain(domain) : builder.domain(domain);
    builder = builder.path(path);
    builder = secure ? builder.secure() : builder;
    builder = httpOnly ? builder.httpOnly() : builder;
    clientCookie = builder.build();

}
 
开发者ID:fodroid,项目名称:XDroid-Databinding,代码行数:22,代码来源:SerializableHttpCookie.java

示例5: doReps

import java.io.ObjectInputStream; //导入方法依赖的package包/类
/**
 * Run benchmark for given number of batches, with given number of cycles
 * for each batch.
 */
void doReps(ObjectOutputStream oout, ObjectInputStream oin,
            StreamBuffer sbuf, int nbatches, int ncycles)
    throws Exception
{
    for (int i = 0; i < nbatches; i++) {
        sbuf.reset();
        for (int j = 0; j < ncycles; j++) {
            oout.writeLong(0);
        }
        oout.flush();
        for (int j = 0; j < ncycles; j++) {
            oin.readLong();
        }
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:20,代码来源:Longs.java

示例6: readObject

import java.io.ObjectInputStream; //导入方法依赖的package包/类
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    String name = (String) in.readObject();
    String value = (String) in.readObject();
    long expiresAt = in.readLong();
    String domain = (String) in.readObject();
    String path = (String) in.readObject();
    boolean secure = in.readBoolean();
    boolean httpOnly = in.readBoolean();
    boolean hostOnly = in.readBoolean();
    @SuppressWarnings("UnusedAssignment") boolean persistent = in.readBoolean();
    Cookie.Builder builder = new Cookie.Builder();
    builder = builder.name(name);
    builder = builder.value(value);
    builder = builder.expiresAt(expiresAt);
    builder = hostOnly ? builder.hostOnlyDomain(domain) : builder.domain(domain);
    builder = builder.path(path);
    builder = secure ? builder.secure() : builder;
    builder = httpOnly ? builder.httpOnly() : builder;
    clientCookie = builder.build();
}
 
开发者ID:wzx54321,项目名称:XinFramework,代码行数:22,代码来源:EntityCookie.java

示例7: readObject

import java.io.ObjectInputStream; //导入方法依赖的package包/类
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    String name = (String) in.readObject();
    String value = (String) in.readObject();
    long expiresAt = in.readLong();
    String domain = (String) in.readObject();
    String path = (String) in.readObject();
    boolean secure = in.readBoolean();
    boolean httpOnly = in.readBoolean();
    boolean hostOnly = in.readBoolean();
    boolean persistent = in.readBoolean();
    Cookie.Builder builder = new Cookie.Builder();
    builder = builder.name(name);
    builder = builder.value(value);
    builder = builder.expiresAt(expiresAt);
    builder = hostOnly ? builder.hostOnlyDomain(domain) : builder.domain(domain);
    builder = builder.path(path);
    builder = secure ? builder.secure() : builder;
    builder = httpOnly ? builder.httpOnly() : builder;
    clientCookies = builder.build();
}
 
开发者ID:ymqq,项目名称:CommonFramework,代码行数:21,代码来源:SerializableOkHttpCookies.java

示例8: readObject

import java.io.ObjectInputStream; //导入方法依赖的package包/类
void readObject(ObjectInputStream in) throws IOException {
    jdk15 = in.readBoolean();
    long t = in.readLong();
    time = new Date(t);
    int len = in.readInt();
    cdThreads = new Object[len];
    for (int i = 0; i < len; i++) {
        try {
            cdThreads[i] = in.readObject();
        } catch (ClassNotFoundException ex) {
            throw new IOException(ex);
        }
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:ThreadDumpResponse.java

示例9: read

import java.io.ObjectInputStream; //导入方法依赖的package包/类
@Override
public final void read(ObjectInputStream is, int count) throws IOException {
    for (int i=0; i<count; ++i) {
        final long value = is.readLong();
        this.codes.put(i, value);
    }
}
 
开发者ID:zavtech,项目名称:morpheus-core,代码行数:8,代码来源:SparseArrayWithLongCoding.java

示例10: read

import java.io.ObjectInputStream; //导入方法依赖的package包/类
@Override
public final void read(ObjectInputStream is, int count) throws IOException {
    for (int i=0; i<count; ++i) {
        final long value = is.readLong();
        this.setLong(i, value);
    }
}
 
开发者ID:zavtech,项目名称:morpheus-core,代码行数:8,代码来源:SparseArrayOfLongs.java

示例11: read

import java.io.ObjectInputStream; //导入方法依赖的package包/类
@Override
public final void read(ObjectInputStream is, int count) throws IOException {
    for (int i=0; i<count; ++i) {
        final long value = is.readLong();
        this.values.put(i, value);
        if (value != defaultValueAsLong) {
            final short zoneId = is.readShort();
            this.zoneIds.put(i, zoneId);
        }
    }
}
 
开发者ID:zavtech,项目名称:morpheus-core,代码行数:12,代码来源:SparseArrayOfZonedDateTimes.java

示例12: readObject

import java.io.ObjectInputStream; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
/** Custom serialization */
private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException {
    this.file = MappedArrayConstructor.randomFile(true);
    this.length = is.readInt();
    this.defaultCode = is.readLong();
    this.defaultValue = (T)is.readObject();
    this.coding = (LongCoding<T>)is.readObject();
    this.channel = new RandomAccessFile(file, "rw").getChannel();
    this.buffer = channel.map(FileChannel.MapMode.READ_WRITE, 0, BYTE_COUNT * length).asLongBuffer();
    for (int i=0; i<length; ++i) {
        final long value = is.readLong();
        this.buffer.put(i, value);
    }
}
 
开发者ID:zavtech,项目名称:morpheus-core,代码行数:16,代码来源:MappedArrayWithLongCoding.java

示例13: importType

import java.io.ObjectInputStream; //导入方法依赖的package包/类
private TypeElem importType(ObjectInputStream in, String modulo)throws IOException,
        ClassNotFoundException{
    String name=in.readUTF();
    boolean explic=in.readBoolean();
    int i=in.readInt();
    Membro[] mem=new Membro[i];
    for(int j=0; j<i; j++){
        int perms=in.readByte()&0xFF;
        TypeName ty=(TypeName)in.readObject();
        String na=in.readUTF();
        int len=in.readInt();
        TypeName[] par=new TypeName[len];
        for(int k=0; k<len; k++)
            par[k]=(TypeName)in.readObject();
        TemplateEle pack=null;
        if(in.readBoolean())
            pack=new NumDich(in.readLong(), 2);
        boolean shadow=(perms % 3)==1;
        boolean read=(perms % 3)==2;
        perms=perms/3;
        boolean gpacked=(perms % 3)==1;
        boolean ghost=(perms % 3)==2;
        mem[j]=new Membro(ty, na, par, shadow, read, gpacked, ghost, pack);
    }
    TypeName ex=null;
    if(in.readBoolean())
        ex=(TypeName)in.readObject();
    return new TypeElem(name, ex, mem, modulo, explic);
}
 
开发者ID:Loara,项目名称:Meucci,代码行数:30,代码来源:ModLoader.java

示例14: readObject

import java.io.ObjectInputStream; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
/** Custom serialization */
private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException {
    this.coding = (LongCoding<T>)is.readObject();
    final int length = is.readInt();
    this.codes = new long[length];
    for (int i=0; i<length; ++i) {
        codes[i] = is.readLong();
    }
}
 
开发者ID:zavtech,项目名称:morpheus-core,代码行数:11,代码来源:DenseArrayWithLongCoding.java

示例15: readObject

import java.io.ObjectInputStream; //导入方法依赖的package包/类
/**
 * Reconstitute this object from a stream (i.e., deserialize it).
 */
private void readObject(ObjectInputStream s)
     throws IOException, ClassNotFoundException
{
    fastTime = s.readLong();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:9,代码来源:Date.java


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