本文整理汇总了Java中org.kohsuke.rngom.parse.compact.EOFException类的典型用法代码示例。如果您正苦于以下问题:Java EOFException类的具体用法?Java EOFException怎么用?Java EOFException使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
EOFException类属于org.kohsuke.rngom.parse.compact包,在下文中一共展示了EOFException类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readChar
import org.kohsuke.rngom.parse.compact.EOFException; //导入依赖的package包/类
public char readChar() throws EOFException
{
if (inBuf > 0)
{
--inBuf;
if (++bufpos == bufsize)
bufpos = 0;
return buffer[bufpos];
}
if (++bufpos >= maxNextCharInd)
FillBuff();
char c = buffer[bufpos];
UpdateLineColumn(c);
return (c);
}
示例2: readChar
import org.kohsuke.rngom.parse.compact.EOFException; //导入依赖的package包/类
public char readChar() throws EOFException
{
if(inBuf > 0)
{
--inBuf;
if(++bufpos == bufsize)
{
bufpos = 0;
}
return buffer[bufpos];
}
if(++bufpos >= maxNextCharInd)
{
FillBuff();
}
char c = buffer[bufpos];
UpdateLineColumn(c);
return (c);
}
示例3: BeginToken
import org.kohsuke.rngom.parse.compact.EOFException; //导入依赖的package包/类
public char BeginToken() throws EOFException
{
tokenBegin = -1;
char c = readChar();
tokenBegin = bufpos;
return c;
}
示例4: BeginToken
import org.kohsuke.rngom.parse.compact.EOFException; //导入依赖的package包/类
public char BeginToken() throws EOFException
{
tokenBegin = -1;
char c = readChar();
tokenBegin = bufpos;
return c;
}
示例5: FillBuff
import org.kohsuke.rngom.parse.compact.EOFException; //导入依赖的package包/类
protected void FillBuff() throws EOFException
{
if (maxNextCharInd == available)
{
if (available == bufsize)
{
if (tokenBegin > 2048)
{
bufpos = maxNextCharInd = 0;
available = tokenBegin;
}
else if (tokenBegin < 0)
bufpos = maxNextCharInd = 0;
else
ExpandBuff(false);
}
else if (available > tokenBegin)
available = bufsize;
else if ((tokenBegin - available) < 2048)
ExpandBuff(true);
else
available = tokenBegin;
}
int i;
try {
if ((i = inputStream.read(buffer, maxNextCharInd,
available - maxNextCharInd)) == -1)
{
inputStream.close();
throw new java.io.IOException();
}
else
maxNextCharInd += i;
return;
}
catch(java.io.IOException e) {
--bufpos;
backup(0);
if (tokenBegin == -1)
tokenBegin = bufpos;
throw new EOFException();
}
}
示例6: FillBuff
import org.kohsuke.rngom.parse.compact.EOFException; //导入依赖的package包/类
protected void FillBuff() throws EOFException
{
if(maxNextCharInd == available)
{
if(available == bufsize)
{
if(tokenBegin > 2048)
{
bufpos = maxNextCharInd = 0;
available = tokenBegin;
}
else if(tokenBegin < 0)
{
bufpos = maxNextCharInd = 0;
}
else
{
ExpandBuff(false);
}
}
else if(available > tokenBegin)
{
available = bufsize;
}
else if((tokenBegin - available) < 2048)
{
ExpandBuff(true);
}
else
{
available = tokenBegin;
}
}
int i;
try
{
if((i = inputStream.read(buffer, maxNextCharInd, available - maxNextCharInd)) == -1)
{
inputStream.close();
throw new java.io.IOException();
}
else
{
maxNextCharInd += i;
}
return;
}
catch(java.io.IOException e)
{
--bufpos;
backup(0);
if(tokenBegin == -1)
{
tokenBegin = bufpos;
}
throw new EOFException();
}
}