DataInput readLong - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for DataInput readLong method.

This code example shows how to use the following methods:readInt, readLong
        output.writeInt((int) metaData.getMaxInactiveInterval(TimeUnit.SECONDS));
    } 
 
    @Override 
    public SimpleSessionMetaData readObject(ObjectInput input) throws IOException {
        Date creationTime = new Date(input.readLong());
        Date lastAccessedTime = new Date(input.readLong());
        Time maxInactiveInterval = new Time(input.readInt(), TimeUnit.SECONDS);
        return new SimpleSessionMetaData(creationTime, lastAccessedTime, maxInactiveInterval);
    } 
} 
8
CodeRank
This code example shows how to use the following methods:readLong, readObject
        output.writeLong(entry.getLastAccessedTime().getTime());
    } 
 
    @Override 
    public InfinispanBeanEntry<G> readObject(ObjectInput input) throws IOException, ClassNotFoundException {
        G groupId = (G) input.readObject();
        InfinispanBeanEntry<G> entry = new InfinispanBeanEntry<>(groupId);
        entry.setLastAccessedTime(new Date(input.readLong()));
        return entry;
    } 
} 
8
CodeRank
This code example shows how to use the following methods:readLong
        throw new UnsupportedOperationException();
    } 
 
    public long readLong() throws IOException 
    { 
        long l = source.readLong();
        bytesRead += 8;
        return l;
    } 
 
    public short readShort() throws IOException 
    { 
        short s = source.readShort();
        bytesRead += 2;
        return s;
    } 
 
    public String readUTF() throws IOException
    { 
        return DataInputStream.readUTF(this);
7
CodeRank
This code example shows how to use the following methods:readLong
    } 
  } 
   
  @Override 
  public void readFields(DataInput in) throws IOException {
    tableName = CWritableUtils.readString(in);
     
    rowKey = new Row.Key();
    rowKey.readFields(in);
     
    columnName = CWritableUtils.readString(in);
     
    cellKey = new Cell.Key();
    cellKey.readFields(in);
     
    length = in.readLong();
    offset = in.readLong();
     
    //deleted = "Y".equals(NWritableUtils.readString(in)); 
  } 

7
CodeRank
This code example shows how to use the following methods:readLong
    out.writeLong(length);
  } 
 
  @Override 
  public void readFields(DataInput in) throws IOException {
    file = new Path(Text.readString(in));
    start = in.readLong();
    length = in.readLong();
    hosts = null;
  } 
 
  @Override 
  public String[] getLocations() throws IOException {
    if (this.hosts == null) {
      return new String[]{};
    } else { 
      return this.hosts;
    } 
  } 
} 
8
CodeRank
This code example shows how to use the following methods:readFully, readInt, readLong, readUTF
		out.write(payload);
	} 
 
	public static NetBrokerMessage read(ObjectInput in) throws IOException
	{ 
		String mid = in.readUTF();
		long exp = in.readLong();
		long ts = in.readLong();
		int size = in.readInt();
		byte[] content = new byte[size];
		in.readFully(content, 0, size);
 
		NetBrokerMessage message = new NetBrokerMessage(content);
		message.setMessageId(mid);
		message.setExpiration(exp);
		message.setTimestamp(ts);
 
		message.getDeferredDelivery();
 
		return message;
7
CodeRank
This code example shows how to use the following methods:readBoolean, readByte, readChar, readDouble, readFloat
        } 
 
        public void readExternal(ObjectInput in)
            throws IOException, ClassNotFoundException 
        { 
            z = in.readBoolean();
            b = in.readByte();
            c = in.readChar();
            s = in.readShort();
            i = in.readInt();
            f = in.readFloat();
            j = in.readLong();
            d = in.readDouble();
            str = (String) in.readObject();
            parent = in.readObject();
            left = in.readObject();
            right = in.readObject();
        } 
    } 
 

7
CodeRank
This code example shows how to use the following methods:readLong
        output.writeLong(uuid.getLeastSignificantBits());
    } 
 
    @Override 
    public UUID readObject(ObjectInput input) throws IOException {
        return new UUID(input.readLong(), input.readLong());
    } 
} 
7
CodeRank
This code example shows how to use the following methods:readLong
    return dataInput.readInt();
  } 
 
  @Override 
  public long readLong() throws IOException {
    return dataInput.readLong();
  } 
 
  @Override 
  public float readFloat() throws IOException {
    return dataInput.readFloat();
  } 
 
  @Override 
  public double readDouble() throws IOException {
    return dataInput.readDouble();
  } 
 
  @Override 
  public String readLine() throws IOException {
7
CodeRank
This code example shows how to use the following methods:readLong
    out.writeLong(remaining);
  } 
 
  @Override 
  public void readFields(DataInput in) throws IOException {
    capacity = in.readLong();
    used = in.readLong();
    remaining = in.readLong();
  } 
} 
7
CodeRank
readLong Method Overview
Reads eight input bytes and returns a long value.
See Code Examples for other Java 8 DataInput Methods: