Lightweight Bartering Grid

lbg.protocol.data
Class SimulatedGridData

java.lang.Object
  extended by lbg.protocol.data.GridData
      extended by lbg.protocol.data.SimulatedGridData
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<GridData>

public class SimulatedGridData
extends GridData

Dummy grid data class for use in the LBG Simulator.

Author:
Xavier Dalem, Cyril Briquet
See Also:
Serialized Form

Field Summary
 
Fields inherited from class lbg.protocol.data.GridData
client_hostname, HASHING_ALGORITHM, id, size
 
Constructor Summary
SimulatedGridData(java.lang.String id, long size)
          Creates a dummy grid data.
 
Method Summary
 byte[] getChecksum()
          Get checksum from data.
 java.io.InputStream getInputStream()
          Get an input stream to read the data
 void toFile(java.io.File f)
          Does nothing
 
Methods inherited from class lbg.protocol.data.GridData
compareTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimulatedGridData

public SimulatedGridData(java.lang.String id,
                         long size)
                  throws GridException
Creates a dummy grid data.

Throws:
GridException
Method Detail

toFile

public void toFile(java.io.File f)
Does nothing

Specified by:
toFile in class GridData
Parameters:
f - The file where to put data

getChecksum

public byte[] getChecksum()
Description copied from class: GridData
Get checksum from data. It must be the checksum from the real data, not of data and combined details like it is the case for torrents.
The used algorithm is specified by HASHING_ALGORITHM.

Specified by:
getChecksum in class GridData
Returns:
null
See Also:
GridData.HASHING_ALGORITHM

getInputStream

public java.io.InputStream getInputStream()
Description copied from class: GridData
Get an input stream to read the data

Specified by:
getInputStream in class GridData
Returns:
null

Lightweight Bartering Grid

Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.