ucr.core
Class FileRecord

java.lang.Object
  extended byucr.core.FileRecord

public class FileRecord
extends java.lang.Object

Represents information about a single file served


Field Summary
(package private)  java.lang.String filename
           
(package private)  int index
           
(package private)  int size
           
 
Constructor Summary
FileRecord(int index, int size, java.lang.String filename)
          Constructs a record describing a shared file
 
Method Summary
(package private)  byte[] getBytes()
          Flatten the FileRecord
 int getIndex()
          Get the index of the file
 java.lang.String getName()
          Get the file name
 int getSize()
          Get the size of the file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

int index

size

int size

filename

java.lang.String filename
Constructor Detail

FileRecord

public FileRecord(int index,
                  int size,
                  java.lang.String filename)
Constructs a record describing a shared file

Parameters:
index - index of the file
size - size of the file in bytes
filename - file name
Method Detail

getIndex

public int getIndex()
Get the index of the file

Returns:
index

getSize

public int getSize()
Get the size of the file

Returns:
file size

getName

public java.lang.String getName()
Get the file name

Returns:
file name

getBytes

byte[] getBytes()
Flatten the FileRecord

Returns:
bytes