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 Classes Modifier and Type Class Description static interface
SVNPatchFileStream.SVNPatchFileLineFilter
static interface
SVNPatchFileStream.SVNPatchFileLineTransformer
-
Field Summary
Fields Modifier and Type Field Description private long
end
private java.io.RandomAccessFile
file
private SVNPatchFileStream.SVNPatchFileLineFilter
lineFilter
private SVNPatchFileStream.SVNPatchFileLineTransformer
lineTransformer
private java.io.File
path
private long
start
private boolean
write
-
Constructor Summary
Constructors Modifier Constructor Description private
SVNPatchFileStream(java.io.File path, boolean write)
private
SVNPatchFileStream(java.io.File path, boolean write, long start, long end)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkPos(long pos)
void
close()
private java.io.RandomAccessFile
getFile()
java.io.File
getPath()
long
getSeekPosition()
boolean
isEOF()
private boolean
isPosValid(long pos)
static SVNPatchFileStream
openForWrite(java.io.File path)
static SVNPatchFileStream
openRangeReadOnly(java.io.File path, long start, long end)
static SVNPatchFileStream
openReadOnly(java.io.File path)
boolean
readLine(java.lang.StringBuffer lineBuf)
boolean
readLine(java.lang.StringBuffer lineBuf, java.lang.String eolStr)
private boolean
readLine(java.lang.StringBuffer input, java.lang.StringBuffer eolStr, boolean detectEol)
boolean
readLineWithEol(java.lang.StringBuffer lineBuf, java.lang.StringBuffer eolStr)
void
reset()
Reset a generic stream back to its origin.void
setLineFilter(SVNPatchFileStream.SVNPatchFileLineFilter lineFilter)
void
setLineTransformer(SVNPatchFileStream.SVNPatchFileLineTransformer lineTransfomer)
void
setSeekPosition(long pos)
void
tryWrite(java.lang.StringBuffer lineBuf)
void
write(java.lang.String str)
void
write(java.lang.StringBuffer str)
-
-
-
Field Detail
-
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
private SVNPatchFileStream.SVNPatchFileLineFilter lineFilter
-
lineTransformer
private SVNPatchFileStream.SVNPatchFileLineTransformer lineTransformer
-
-
Method Detail
-
openReadOnly
public static SVNPatchFileStream openReadOnly(java.io.File path) throws java.io.IOException, SVNException
- Throws:
java.io.IOException
SVNException
-
openRangeReadOnly
public static SVNPatchFileStream openRangeReadOnly(java.io.File path, long start, long end) throws java.io.IOException, SVNException
- Throws:
java.io.IOException
SVNException
-
openForWrite
public static SVNPatchFileStream openForWrite(java.io.File path) throws java.io.IOException, SVNException
- Throws:
java.io.IOException
SVNException
-
getPath
public java.io.File getPath()
-
setLineFilter
public void setLineFilter(SVNPatchFileStream.SVNPatchFileLineFilter lineFilter)
-
setLineTransformer
public void setLineTransformer(SVNPatchFileStream.SVNPatchFileLineTransformer lineTransfomer)
-
getFile
private java.io.RandomAccessFile getFile() throws SVNException
- Throws:
SVNException
-
reset
public void reset() throws java.io.IOException, SVNException
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.IOException
SVNException
-
close
public void close() throws java.io.IOException
- Throws:
java.io.IOException
-
isEOF
public boolean isEOF() throws java.io.IOException, SVNException
- Throws:
java.io.IOException
SVNException
-
getSeekPosition
public long getSeekPosition() throws SVNException, java.io.IOException
- Throws:
SVNException
java.io.IOException
-
setSeekPosition
public void setSeekPosition(long pos) throws SVNException, java.io.IOException
- Throws:
SVNException
java.io.IOException
-
checkPos
private void checkPos(long pos) throws SVNException
- Throws:
SVNException
-
isPosValid
private boolean isPosValid(long pos)
-
write
public void write(java.lang.String str) throws SVNException, java.io.IOException
- Throws:
SVNException
java.io.IOException
-
write
public void write(java.lang.StringBuffer str) throws SVNException, java.io.IOException
- Throws:
SVNException
java.io.IOException
-
tryWrite
public void tryWrite(java.lang.StringBuffer lineBuf) throws SVNException, java.io.IOException
- Throws:
SVNException
java.io.IOException
-
readLineWithEol
public boolean readLineWithEol(java.lang.StringBuffer lineBuf, java.lang.StringBuffer eolStr) throws java.io.IOException, SVNException
- Throws:
java.io.IOException
SVNException
-
readLine
public boolean readLine(java.lang.StringBuffer lineBuf) throws java.io.IOException, SVNException
- Throws:
java.io.IOException
SVNException
-
readLine
public boolean readLine(java.lang.StringBuffer lineBuf, java.lang.String eolStr) throws java.io.IOException, SVNException
- Throws:
java.io.IOException
SVNException
-
readLine
private boolean readLine(java.lang.StringBuffer input, java.lang.StringBuffer eolStr, boolean detectEol) throws java.io.IOException, SVNException
- Throws:
java.io.IOException
SVNException
-
-