thredds.filesystem
Class CacheFileProto

java.lang.Object
  extended by thredds.filesystem.CacheFileProto
All Implemented Interfaces:
Externalizable, Serializable

public class CacheFileProto
extends Object
implements Externalizable

Externalizable representation of a java.io.File using protobuf for serialization.

Since:
Jul 6, 2009
Author:
caron
See Also:
Serialized Form

Field Summary
static int countRead
           
static int countReadSize
           
static int countWrite
           
static int countWriteSize
           
protected  boolean isDirectory
           
protected  long lastModified
           
protected  long length
           
protected  String shortName
           
 
Constructor Summary
CacheFileProto()
           
CacheFileProto(File f)
           
 
Method Summary
 Object getAttribute(String key)
           
 long getLastModified()
           
 long getLength()
           
 String getShortName()
           
 boolean isDirectory()
           
 void readExternal(ObjectInput in)
           
 void setAttribute(String key, Object value)
           
 void setDirectory(boolean directory)
           
 void setLastModified(long lastModified)
           
 void setLength(long length)
           
 void setShortName(String shortName)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

countRead

public static int countRead

countReadSize

public static int countReadSize

countWrite

public static int countWrite

countWriteSize

public static int countWriteSize

shortName

protected String shortName

lastModified

protected long lastModified

length

protected long length

isDirectory

protected boolean isDirectory
Constructor Detail

CacheFileProto

public CacheFileProto(File f)

CacheFileProto

public CacheFileProto()
Method Detail

setShortName

public void setShortName(String shortName)

setLastModified

public void setLastModified(long lastModified)

setLength

public void setLength(long length)

setDirectory

public void setDirectory(boolean directory)

getShortName

public String getShortName()

getLastModified

public long getLastModified()

getLength

public long getLength()

isDirectory

public boolean isDirectory()

setAttribute

public void setAttribute(String key,
                         Object value)

getAttribute

public Object getAttribute(String key)

toString

public String toString()
Overrides:
toString in class Object

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.