com.caucho.server.cache
Class TempFileInode

java.lang.Object
  extended by com.caucho.server.cache.TempFileInode

public class TempFileInode
extends java.lang.Object

Represents an inode to a temporary file.


Method Summary
 boolean allocate()
          Allocates access to the inode.
 void free()
          Allocates access to the inode.
 long getLength()
           
 java.io.InputStream openInputStream()
          Opens a stream to read from the temp file
 java.io.OutputStream openOutputStream()
          Opens a stream to write to the temp file
 java.io.Writer openWriter()
           
 void writeToStream(OutputStreamWithBuffer os)
          Writes the inode value to a stream.
 void writeToStream(OutputStreamWithBuffer os, long offset, long length)
          Writes the inode value to a stream.
 void writeToWriter(java.io.Writer out)
          Writes the inode value to a stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getLength

public long getLength()

allocate

public boolean allocate()
Allocates access to the inode.


openOutputStream

public java.io.OutputStream openOutputStream()
Opens a stream to write to the temp file


openInputStream

public java.io.InputStream openInputStream()
Opens a stream to read from the temp file


openWriter

public java.io.Writer openWriter()

writeToStream

public void writeToStream(OutputStreamWithBuffer os)
                   throws java.io.IOException
Writes the inode value to a stream.

Throws:
java.io.IOException

writeToStream

public void writeToStream(OutputStreamWithBuffer os,
                          long offset,
                          long length)
                   throws java.io.IOException
Writes the inode value to a stream.

Throws:
java.io.IOException

writeToWriter

public void writeToWriter(java.io.Writer out)
                   throws java.io.IOException
Writes the inode value to a stream.

Throws:
java.io.IOException

free

public void free()
Allocates access to the inode.