hi
you can use InputStreamReader or FileReader (both are in Java.io.Reader
class)
import java.io.*;
class test
{
public static void main(String args[] )
{
try
{
// if the input is from the file use
// FileReader fread= new FileReader ("value.txt");
// if the input is from keybord use:
InputStreamReader inread= new
InputStreamReader(System.in);
// read while your input is x
int i ;
while ((i=inread.read())!=x)
{
system.out.print((char) i );
}
inread.close();
catch(Exeception e)
// error message
}
}
}
hope it helps;
sam,
----- Original Message -----
From: Stephen Fenelon <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 17, 2001 1:35 PM
Subject: bufferedreader
> Hi,
> does anyone know of any example code for a getting a string without using
> bufferedreader?
>
> I have tried to find on many sites they all use buffered reader, the
> readline() method fouls things up for me. All I want is the plain string
> nothing else!!
>
> thanks
> Stephen
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html