com.starteam
Class File.Stream

java.lang.Object
  extended by com.starteam.File.Stream
Enclosing class:
File

public static final class File.Stream
extends java.lang.Object

Provides utility functions for manipulating File streams.


Constructor Summary
File.Stream()
           
 
Method Summary
static long computeCompareMD5(java.io.File file, boolean bUsesKeywords, boolean bConvertEOL, MD5 md5)
          Derives an MD5 signature representing what the content of the given file would be if stored in the StarTeam repository.
static long computeSyncMD5(java.io.File file, MD5 md5)
          Derives an MD5 signature representing an actual working file on disk.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

File.Stream

public File.Stream()
Method Detail

computeSyncMD5

public static long computeSyncMD5(java.io.File file,
                                  MD5 md5)
                           throws java.io.IOException
Derives an MD5 signature representing an actual working file on disk.

Parameters:
file - The working file on disk. An exception will be thrown if the file does not exist or cannot be read.
md5 - A newly initialized MD5 signature. On output, contains the MD5 signature calculated from the file's content.
Returns:
The number of bytes in the working file on disk.
Throws:
java.io.IOException
See Also:
File.Stream.computeCompareMD5(java.io.File, boolean, boolean, com.starteam.util.MD5), File.resyncStatus(com.starteam.util.MD5, long, com.starteam.util.MD5, long, com.starteam.util.DateTime), File.Status

computeCompareMD5

public static long computeCompareMD5(java.io.File file,
                                     boolean bUsesKeywords,
                                     boolean bConvertEOL,
                                     MD5 md5)
                              throws java.io.IOException
Derives an MD5 signature representing what the content of the given file would be if stored in the StarTeam repository.

Compensates for the effects of expanding keywords and performing end-of-line conversion on checkout.

Parameters:
file - The working file on disk. An exception will be thrown if the file does not exist or cannot be read.
md5 - A newly initialized MD5 signature. On output, contains the MD5 signature calculated from the file's content, adjusted as determined by bUsesKeywords and bConvertEOL.
bUsesKeywords - True if this file uses keywords. If true, then the signature is adjusted to compensate for any keyword expansion that would occur on a checkin. If this is a binary file (that is, if it contains at least one '\0' character), bUsesKeywords is ignored, and no adjustment is made to the signature.
bConvertEOL - True if this is a text file (as opposed to a binary file). The end-of-line characters of text files are always converted to a canonical format in the repository. To specify the desired end-of-line sequence for the working file, see setEOLFormat.
Returns:
The number of bytes in the as it would be stored in the StarTeam repository.
Throws:
java.io.IOException
See Also:
File.Stream.computeSyncMD5(java.io.File, com.starteam.util.MD5), File.resyncStatus(com.starteam.util.MD5, long, com.starteam.util.MD5, long, com.starteam.util.DateTime), File.Status


StarTeam SDK 14.0, Build 21
Copyright © 2003-2012 Borland Software Corporation. All rights reserved.