org.alfresco.filesys.repo
Class TempNetworkFile

java.lang.Object
  extended by org.alfresco.jlan.server.filesys.NetworkFile
      extended by org.alfresco.jlan.smb.server.disk.JavaNetworkFile
          extended by org.alfresco.filesys.repo.TempNetworkFile
All Implemented Interfaces:
org.alfresco.jlan.server.filesys.cache.NetworkFileStateInterface

public class TempNetworkFile
extends org.alfresco.jlan.smb.server.disk.JavaNetworkFile
implements org.alfresco.jlan.server.filesys.cache.NetworkFileStateInterface

Temporary Java backed network file.


Field Summary
 
Fields inherited from class org.alfresco.jlan.smb.server.disk.JavaNetworkFile
m_eof, m_file, m_io
 
Fields inherited from class org.alfresco.jlan.server.filesys.NetworkFile
Created, DelayedClose, DelayedWriteError, DeleteOnClose, IOPending, m_accessDate, m_allowedAccess, m_attrib, m_closed, m_createDate, m_dirId, m_fid, m_fileSize, m_fullName, m_grantedAccess, m_modifyDate, m_name, m_streamId, m_streamName, m_uniqueId, m_writeCount, READONLY, READWRITE, WRITEONLY
 
Constructor Summary
TempNetworkFile(java.io.File file, java.lang.String netPath)
          Create a new temporary file with no existing content.
TempNetworkFile(java.io.File file, java.lang.String netPath, java.io.Reader existingContent)
          A new temporary network file with some existing content.
 
Method Summary
 java.io.File getFile()
          Access to the underlying file.
 org.alfresco.jlan.server.filesys.cache.FileState getFileState()
           
 int readFile(byte[] buf, int len, int pos, long fileOff)
           
 void setFileState(org.alfresco.jlan.server.filesys.cache.FileState fileState)
           
 java.lang.String toString()
           
 void truncateFile(long size)
           
 void writeFile(byte[] buf, int len, int pos)
           
 void writeFile(byte[] buffer, int length, int position, long fileOffset)
           
 
Methods inherited from class org.alfresco.jlan.smb.server.disk.JavaNetworkFile
closeFile, currentPosition, flushFile, isEndOfFile, openFile, seekFile
 
Methods inherited from class org.alfresco.jlan.server.filesys.NetworkFile
addLock, close, getAccessDate, getAccessToken, getAllowedAccess, getCreationDate, getDirectoryId, getFileAttributes, getFileId, getFileSize, getFileSizeInt, getFullName, getFullNameStream, getGrantedAccess, getGrantedAccessAsString, getLockAt, getLockList, getModifyDate, getName, getOpLock, getProtocolId, getStreamId, getStreamName, getUniqueId, getWriteCount, hasAccessDate, hasAccessToken, hasCreationDate, hasDelayedClose, hasDelayedWriteError, hasDeleteOnClose, hasIOPending, hasLocks, hasModifyDate, hasNTAttribute, hasOpLock, incrementWriteCount, isArchived, isClosed, isDirectory, isHidden, isReadOnly, isStream, isSystem, numberOfLocks, removeAllLocks, removeLock, setAccessDate, setAccessToken, setAllowedAccess, setAttributes, setClosed, setCreationDate, setDelayedClose, setDelayedWriteError, setDeleteOnClose, setDirectoryId, setFileId, setFileSize, setFileSize, setFullName, setGrantedAccess, setIOPending, setModifyDate, setName, setOpLock, setProtocolId, setStatusFlag, setStreamId, setStreamName, setUniqueId, setUniqueId, setUniqueId, wasCreated
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TempNetworkFile

public TempNetworkFile(java.io.File file,
                       java.lang.String netPath)
Create a new temporary file with no existing content.

Parameters:
file - the underlying File
netPath - where in the repo this file is going.

TempNetworkFile

public TempNetworkFile(java.io.File file,
                       java.lang.String netPath,
                       java.io.Reader existingContent)
A new temporary network file with some existing content.

Parameters:
file -
netPath -
existingContent -
Method Detail

getFile

public java.io.File getFile()
Access to the underlying file.

Returns:
the file.

toString

public java.lang.String toString()
Overrides:
toString in class org.alfresco.jlan.server.filesys.NetworkFile

readFile

public int readFile(byte[] buf,
                    int len,
                    int pos,
                    long fileOff)
             throws java.io.IOException
Overrides:
readFile in class org.alfresco.jlan.smb.server.disk.JavaNetworkFile
Throws:
java.io.IOException

writeFile

public void writeFile(byte[] buf,
                      int len,
                      int pos)
               throws java.io.IOException
Overrides:
writeFile in class org.alfresco.jlan.smb.server.disk.JavaNetworkFile
Throws:
java.io.IOException

writeFile

public void writeFile(byte[] buffer,
                      int length,
                      int position,
                      long fileOffset)
               throws java.io.IOException
Overrides:
writeFile in class org.alfresco.jlan.smb.server.disk.JavaNetworkFile
Throws:
java.io.IOException

truncateFile

public void truncateFile(long size)
                  throws java.io.IOException
Overrides:
truncateFile in class org.alfresco.jlan.smb.server.disk.JavaNetworkFile
Throws:
java.io.IOException

setFileState

public void setFileState(org.alfresco.jlan.server.filesys.cache.FileState fileState)

getFileState

public org.alfresco.jlan.server.filesys.cache.FileState getFileState()
Specified by:
getFileState in interface org.alfresco.jlan.server.filesys.cache.NetworkFileStateInterface


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.