Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

java.lang.StringIndexOutOfBoundsException: String index out of range: -1

2 views
Skip to first unread message

moort...@gmail.com

unread,
Dec 27, 2006, 2:29:37 AM12/27/06
to
hi
I have the problem in following code. The error already notified in
subject. Do needfull for ours.

public void ReadFile(String sFileName)
{
String inputLine = sFileName;
try
{
FileReader fr = new FileReader(inputLine);
BufferedReader is = new BufferedReader(fr);
while ((inputLine = is.readLine())!= null)
{
s += inputLine+"~";
}
PdfPrint(s);
fr.close();
is.close();
}
catch (IOException e)
{
System.out.println("IOException: " + e);
}
}
Thanks

krishna.v

Kevin Dean [TeamB]

unread,
Dec 27, 2006, 8:24:04 AM12/27/06
to
moort...@gmail.com wrote:

> I have the problem in following code. The error already notified in
>subject. Do needfull for ours.

In order to determine where the error resides, we'd have to see a complete
stack trace. At a guess, it's occurring in the PdfPrint() method, because
there's nothing in the code you've posted that would generate that
exception.

--
Kevin Dean [TeamB]
Dolphin Data Development Ltd.
http://www.datadevelopment.com/

NEW WHITEPAPERS
Team Development with JBuilder and Borland Enterprise Server
Securing Borland Enterprise Server
http://www.datadevelopment.com/papers/index.html

Please see Borland's newsgroup guidelines at
http://info.borland.com/newsgroups/guide.html

0 new messages