com.stevesoft.pat.wrap
Class RandomAccessFileWrap
java.lang.Object
|
+--com.stevesoft.pat.wrap.RandomAccessFileWrap
- All Implemented Interfaces:
- StringLike
- public class RandomAccessFileWrap
- extends java.lang.Object
- implements StringLike
Provides a wrapper for a RandomAccessFile so that it
can be searched by Regex.
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
RandomAccessFileWrap
public RandomAccessFileWrap(java.lang.String file)
throws java.io.IOException
RandomAccessFileWrap
public RandomAccessFileWrap(java.io.RandomAccessFile raf)
setOffset
public void setOffset(long o)
getOffset
public long getOffset()
getBufferSize
public int getBufferSize()
setBufferSize
public void setBufferSize(int bs)
charAt
public char charAt(int i)
- Specified by:
- charAt in interface StringLike
toString
public java.lang.String toString()
- Specified by:
- toString in interface StringLike
- Overrides:
- toString in class java.lang.Object
length
public int length()
- Specified by:
- length in interface StringLike
substring
public java.lang.String substring(int i1,
int i2)
- Specified by:
- substring in interface StringLike
unwrap
public java.lang.Object unwrap()
- Description copied from interface: StringLike
- Obtain the underlying object, be it a String, char[],
RandomAccessFile, whatever.
- Specified by:
- unwrap in interface StringLike
main
public static void main(java.lang.String[] files)
throws java.io.IOException
newStringBufferLike
public BasicStringBufferLike newStringBufferLike()
- Description copied from interface: StringLike
- By default, the result is put in a String or char[]
when a replace is done. If you wish to save the result
in some other StringBufferLike then you can do this
by implementing this method, or over-riding it's behavior
from an existing class.
- Specified by:
- newStringBufferLike in interface StringLike
indexOf
public int indexOf(char c)
- Specified by:
- indexOf in interface StringLike