Methods Summary |
---|
public void | Add(int iByte)
addElement(new Character((char)iByte));
|
public void | Add(char c)
addElement(new Character(c));
|
public char | At(int iLoc)
try{
return ((Character) elementAt(iLoc)).charValue();
}
catch (Throwable e) {System.out.println(e);}
return '$";
|
void | Concatenate(Buffer bufOther)
int iSize = bufOther.size();
for(int i = 0; i < iSize; i ++)
addElement(new Character(bufOther.At(i)) );
|
void | Concatenate(java.lang.String strBuf)
int iLen = strBuf.length();
for(int i = 0; i < iLen; i++)
Add(strBuf.charAt(i));
|
boolean | StartsWithComment()
int iSize = size(), i = 0;
char ch;
if(iSize == 0) return false;
do{
ch = At(i++);
}while(i < iSize && Character.isSpace(ch));
if(ch == '/"){
for(int j = i; j < i+2; j++)
if(At(j)!='*")
return false;
return true;
}
else return false;
|
public synchronized void | WriteOut() //to stdio
Enumeration enum = elements();
for(;enum.hasMoreElements();){
Character Char = (Character)(enum.nextElement());
System.out.print(Char.charValue());
}
|
public synchronized void | WriteOut(java.io.DataOutputStream dos)Purpose: Writes this object to DataOutputStream
int iSize = size();
try{
for(int i = 0; i < iSize; i ++){
char ch = At(i);
dos.writeByte(At(i));
}
} catch(IOException e){System.out.println("IO error in Buffer WriteOut(dos)");}
|