|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.netbeans.lib.cvsclient.file.DefaultFileHandler
Provides a basic implementation of FileHandler, and does much of the handling of reading and writing files and performing CRLF conversions.
| Constructor Summary | |
DefaultFileHandler()
Creates a DefaultFileHandler. |
|
| Method Summary | |
Request[] |
getInitialisationRequests()
Get any requests that must be sent before commands are sent, to init this file handler. |
protected java.lang.String |
getLengthString(long length)
Get the string to transmit containing the file transmission length. |
protected java.io.InputStream |
getProcessedInputStream(java.io.File file)
|
protected java.io.Reader |
getProcessedReader(java.io.File f)
|
TransmitTextFilePreprocessor |
getTransmitTextFilePreprocessor()
Returns the preprocessor for transmitting text files. |
WriteTextFilePreprocessor |
getWriteRcsDiffFilePreprocessor()
Gets the preprocessor for merging text files after getting (and un-gzipping) the diff received from server. |
WriteTextFilePreprocessor |
getWriteTextFilePreprocessor()
Gets the preprocessor for writing text files after getting (and un-gzipping) from server. |
void |
removeLocalFile(java.lang.String pathname)
Remove the specified file from the local disk. |
void |
renameLocalFile(java.lang.String pathname,
java.lang.String newName)
Rename the local file. |
void |
setGlobalOptions(GlobalOptions globalOptions)
Sets the global options. |
void |
setNextFileDate(java.util.Date modifiedDate)
Set the modified date of the next file to be written. |
void |
setTransmitTextFilePreprocessor(TransmitTextFilePreprocessor transmitTextFilePreprocessor)
Sets the preprocessor for transmitting text files. |
void |
setWriteRcsDiffFilePreprocessor(WriteTextFilePreprocessor writeRcsDiffFilePreprocessor)
Sets the preprocessor for merging text files after getting (and un-gzipping) the diff received from server. |
void |
setWriteTextFilePreprocessor(WriteTextFilePreprocessor writeTextFilePreprocessor)
Sets the preprocessor for writing text files after getting (and un-gzipping) from server. |
void |
transmitBinaryFile(java.io.File file,
LoggedDataOutputStream dos)
Transmit a binary file to the server, using the standard CVS protocol conventions. |
void |
transmitTextFile(java.io.File file,
LoggedDataOutputStream dos)
Transmit a text file to the server, using the standard CVS protocol conventions. |
void |
writeBinaryFile(java.lang.String path,
java.lang.String mode,
LoggedDataInputStream dis,
int length)
Write (either create or replace) a binary file on the local machine with one read from the server. |
void |
writeRcsDiffFile(java.lang.String path,
java.lang.String mode,
LoggedDataInputStream dis,
int length)
Merge a text file on the local machine with the diff from the server. |
void |
writeTextFile(java.lang.String path,
java.lang.String mode,
LoggedDataInputStream dis,
int length)
Write (either create or replace) a file on the local machine with one read from the server. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public DefaultFileHandler()
| Method Detail |
public TransmitTextFilePreprocessor getTransmitTextFilePreprocessor()
public void setTransmitTextFilePreprocessor(TransmitTextFilePreprocessor transmitTextFilePreprocessor)
public WriteTextFilePreprocessor getWriteTextFilePreprocessor()
public void setWriteTextFilePreprocessor(WriteTextFilePreprocessor writeTextFilePreprocessor)
public WriteTextFilePreprocessor getWriteRcsDiffFilePreprocessor()
public void setWriteRcsDiffFilePreprocessor(WriteTextFilePreprocessor writeRcsDiffFilePreprocessor)
protected java.lang.String getLengthString(long length)
length - the amount of data that will be sent
protected java.io.Reader getProcessedReader(java.io.File f)
throws java.io.IOException
java.io.IOException
protected java.io.InputStream getProcessedInputStream(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic Request[] getInitialisationRequests()
getInitialisationRequests in interface FileHandler
public void transmitTextFile(java.io.File file,
LoggedDataOutputStream dos)
throws java.io.IOException
transmitTextFile in interface FileHandlerfile - the file to transmitdos - the data outputstream on which to transmit the file
java.io.IOException
public void transmitBinaryFile(java.io.File file,
LoggedDataOutputStream dos)
throws java.io.IOException
transmitBinaryFile in interface FileHandlerfile - the file to transmitdos - the data outputstream on which to transmit the file
java.io.IOException
public void writeTextFile(java.lang.String path,
java.lang.String mode,
LoggedDataInputStream dis,
int length)
throws java.io.IOException
writeTextFile in interface FileHandlerpath - the absolute path of the file, (including the file name).mode - the mode of the filedis - the stream to read the file from, as byteslength - the number of bytes to read
java.io.IOException
public void writeRcsDiffFile(java.lang.String path,
java.lang.String mode,
LoggedDataInputStream dis,
int length)
throws java.io.IOException
writeRcsDiffFile in interface FileHandlerpath - the absolute path of the file, (including the file name).mode - the mode of the filedis - the stream to read the file from, as byteslength - the number of bytes to read
java.io.IOException
public void writeBinaryFile(java.lang.String path,
java.lang.String mode,
LoggedDataInputStream dis,
int length)
throws java.io.IOException
writeBinaryFile in interface FileHandlerpath - the absolute path of the file, (including the file name).mode - the mode of the filedis - the stream to read the file from, as byteslength - the number of bytes to read
java.io.IOException
public void removeLocalFile(java.lang.String pathname)
throws java.io.IOException
removeLocalFile in interface FileHandlerpathname - the full path to the file to remove
java.io.IOException - if an IO error occurs while removing the file
public void renameLocalFile(java.lang.String pathname,
java.lang.String newName)
throws java.io.IOException
renameLocalFile in interface FileHandlerpathname - the full path to the file to renamenewName - the new name of the file (not the full path)
java.io.IOException - if an IO error occurs while renaming the filepublic void setNextFileDate(java.util.Date modifiedDate)
setNextFileDate in interface FileHandlermodifiedDate - the date the file should be marked as modifiedpublic void setGlobalOptions(GlobalOptions globalOptions)
setGlobalOptions in interface FileHandler
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||