Class SVNPatchFileStream
java.lang.Object
org.tmatesoft.svn.core.internal.wc.patch.SVNPatchFileStream
public class SVNPatchFileStream
extends java.lang.Object
- Version:
- 1.3
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate longprivate java.io.RandomAccessFileprivate java.io.Fileprivate longprivate boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSVNPatchFileStream(java.io.File path, boolean write) privateSVNPatchFileStream(java.io.File path, boolean write, long start, long end) -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckPos(long pos) voidclose()private java.io.RandomAccessFilegetFile()java.io.FilegetPath()longbooleanisEOF()private booleanisPosValid(long pos) static SVNPatchFileStreamopenForWrite(java.io.File path) static SVNPatchFileStreamopenRangeReadOnly(java.io.File path, long start, long end) static SVNPatchFileStreamopenReadOnly(java.io.File path) booleanreadLine(java.lang.StringBuffer lineBuf) booleanreadLine(java.lang.StringBuffer lineBuf, java.lang.String eolStr) private booleanreadLine(java.lang.StringBuffer input, java.lang.StringBuffer eolStr, boolean detectEol) booleanreadLineWithEol(java.lang.StringBuffer lineBuf, java.lang.StringBuffer eolStr) voidreset()Reset a generic stream back to its origin.voidvoidsetLineTransformer(SVNPatchFileStream.SVNPatchFileLineTransformer lineTransfomer) voidsetSeekPosition(long pos) voidtryWrite(java.lang.StringBuffer lineBuf) voidwrite(java.lang.String str) voidwrite(java.lang.StringBuffer str) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
path
private java.io.File path -
write
private boolean write -
start
private long start -
end
private long end -
file
private java.io.RandomAccessFile file -
lineFilter
-
lineTransformer
-
-
Constructor Details
-
SVNPatchFileStream
private SVNPatchFileStream(java.io.File path, boolean write, long start, long end) -
SVNPatchFileStream
private SVNPatchFileStream(java.io.File path, boolean write)
-
-
Method Details
-
openReadOnly
public static SVNPatchFileStream openReadOnly(java.io.File path) throws java.io.IOException, SVNException - Throws:
java.io.IOExceptionSVNException
-
openRangeReadOnly
public static SVNPatchFileStream openRangeReadOnly(java.io.File path, long start, long end) throws java.io.IOException, SVNException - Throws:
java.io.IOExceptionSVNException
-
openForWrite
public static SVNPatchFileStream openForWrite(java.io.File path) throws java.io.IOException, SVNException - Throws:
java.io.IOExceptionSVNException
-
getPath
public java.io.File getPath() -
setLineFilter
-
setLineTransformer
-
getFile
- Throws:
SVNException
-
reset
Reset a generic stream back to its origin. E.g. On a file this would be implemented as a seek to position 0). This function returns a #SVN_ERR_STREAM_RESET_NOT_SUPPORTED error when the stream doesn't implement resetting.- Throws:
java.io.IOExceptionSVNException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
isEOF
- Throws:
java.io.IOExceptionSVNException
-
getSeekPosition
- Throws:
SVNExceptionjava.io.IOException
-
setSeekPosition
- Throws:
SVNExceptionjava.io.IOException
-
checkPos
- Throws:
SVNException
-
isPosValid
private boolean isPosValid(long pos) -
write
- Throws:
SVNExceptionjava.io.IOException
-
write
- Throws:
SVNExceptionjava.io.IOException
-
tryWrite
- Throws:
SVNExceptionjava.io.IOException
-
readLineWithEol
public boolean readLineWithEol(java.lang.StringBuffer lineBuf, java.lang.StringBuffer eolStr) throws java.io.IOException, SVNException - Throws:
java.io.IOExceptionSVNException
-
readLine
- Throws:
java.io.IOExceptionSVNException
-
readLine
public boolean readLine(java.lang.StringBuffer lineBuf, java.lang.String eolStr) throws java.io.IOException, SVNException - Throws:
java.io.IOExceptionSVNException
-
readLine
private boolean readLine(java.lang.StringBuffer input, java.lang.StringBuffer eolStr, boolean detectEol) throws java.io.IOException, SVNException - Throws:
java.io.IOExceptionSVNException
-