Sto leggendo tutti i caratteri nello stream. Lo sto leggendo con inputStream.read. Questo è java.io.Reader inputStream. Come posso ignorare caratteri speciali come @ durante la lettura nel buffer.Rimuovi o ignora carattere dal lettore
codice
private final void FillBuff() throws java.io.IOException
{
int i;
if (maxNextCharInd == 4096)
maxNextCharInd = nextCharInd = 0;
try {
if ((i = inputStream.read(nextCharBuf, maxNextCharInd,
4096 - maxNextCharInd)) == -1)
{
inputStream.close();
throw new java.io.IOException();
}
else
maxNextCharInd += i;
return;
}
catch(java.io.IOException e) {
if (bufpos != 0)
{
--bufpos;
backup(0);
}
else
{
bufline[bufpos] = line;
bufcolumn[bufpos] = column;
}
throw e;
}
}
InputStreams legge byte, non caratteri. Intendi Reader. –
oh. scusa. naturalmente - intendo la classe Reader. –