本文整理汇总了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();
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
}
}
示例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();
}
示例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();
}
示例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);
}
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
}
示例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);
}
}
示例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);
}
示例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();
}
}
示例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();
}