Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Input and Output problems
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


vivek
Input and Output problems
1 Answer(s)      6 years and 3 months ago
Posted in : Java Beginners



Advertisement
View Answers

September 10, 2008 at 3:24 PM


Hi friend,


InputStreamReader:

An InputStreamReader is a bridge from byte streams to character streams i.e. it reads bytes and decodes them into Unicode characters according to a particular platform. Thus, this class reads characters from a byte input stream. When you create an InputStreamReader, you specify an InputStream from which, the InputStreamReader reads the bytes.

FileReader:

FileReader is a convenience class for reading character files. it is generally meant for reading streams of characters.
The constructors of this class assume that the default character encoding and the default byte-buffer size are appropriate. To specify these values yourself, construct an InputStreamReader on a FileInputStream. FileReader is meant for reading streams of characters.


Buffer:

A container for data of a specific primitive type.

A buffer is a linear, finite sequence of elements of a specific primitive type.
* A buffer's capacity is the number of elements it contains. The capacity of a buffer is never negative and never changes.
* A buffer's limit is the index of the first element that should not be read or written. A buffer's limit is never negative and is never greater than the its capacity.
* A buffer's position is the index of the next element to be read or written. A buffer's position is never negative and is never greater than its limit.

---------------------------------------

I am sending you a link. This link will help you.

http://www.roseindia.net/java/beginners/LineNumberReaderExample.shtml

Thanks.


Related Tutorials/Questions & Answers:
Input and Output problems - Java Beginners
Input and Output problems  1) what is Difference between InputStreamReader and FileReader? 2) what is buffer?   Hi friend... to a particular platform. Thus, this class reads characters from a byte input stream
input output
Input And Output       Introduction The Java I/O means Java Input/Output and is a part...*; package, which is required for any input/output operations. Classes Defined
Advertisements
input output
input output  java program using fileinputstream and fileoutputstream   Hi Friend, Try the following code: import java.io.*; class FileInputStreamAndFileOutputStream { public static void main(String[] args
input output
input output  java program using fileinputstream and fileoutputstream   Hi Friend, Try the following code: import java.io.*; class FileInputStreamAndFileOutputStream { public static void main(String[] args
Data input & output Stream
Data input & output Stream  Explain Data Input Stream and Data Output Stream Class.   DataInputStream and DataOutputStream A data input stream lets an application read primitive Java data types from an underlying input
Input and Output package
Input and Output package  Hi guys, My professor used input and output... she used in.readint() out.writeln() commands to read input and print output. she created two new objects directly to use this statements. /* input and output
input output in java
input output in java  java program using filereader and filewriter   Hi Friend, Try the following code: import java.io.*; class FileInputStreamAndFileOutputStream { public static void main(String[] args) throws
Input And Output
Input And Output       Introduction The Java I/O means Java Input/Output and is a part of java.io..., which is required for any input/output operations. Classes Defined in the program
Input / Output in Easiest Method in Java
Input / Output in Easiest Method in Java  How to input from keyboard, both strings and characters and display the result on the screen...)throws Exception{ Scanner input=new Scanner(System.in
counting the values in input file and and writing the output to a file
counting the values in input file and and writing the output to a file ... it should write the output to a file. Input file has 20 rows and 4 columns. If we...-code/16483-counting-values-input-file-writing-output-file.html this code
Java Input/Output Examples
Java Input/Output Examples In this tutorial you will learn about how the Inputs and outputs are managed in java. To understand the Java Input & Output... and interfaces to handle the system input & output through data streams
Input - Output String Functions
Input - Output String Functions      ... a string data and input them directly into your database. Some special characters...); ?> Output: Actual string is:rose'india After adding slash it become:rose
output
output  Sir,I am experiencing some problems with the output of this program.I got some useful help this website,but the output of the program isn't producing what it should.let me explain the output below is what happen when
Working With File,Java Input,Java Input Output,Java Inputstream,Java io Tutorial,Java io package,Java io example
; Output of the Program C:\nisha>javac CreateFile1.java C... will see a message as shown in the output. C:\nisha>javac
input
input  a java program that will exchange the last names of two students that were input by a user
Problems in Stringtokenizer
Problems in Stringtokenizer  hi here is my code import java.util.... advice; } public class Input { public int n,nn,vn... node[]; StringTokenizer str,str1; Input() throws Exception { FileReader df=new
Problems in Stringtokenizer
Problems in Stringtokenizer  hi here is my code import java.util.... advice; } public class Input { public int n,nn,vn... node[]; StringTokenizer str,str1; Input() throws Exception { FileReader df=new
Problems in Stringtokenizer
Problems in Stringtokenizer  hi here is my code import java.util.... advice; } public class Input { public int n,nn,vn... node[]; StringTokenizer str,str1; Input() throws Exception { FileReader df=new
arraylist problems?
arraylist problems?   myprogram needs to ask the user for a file name. The file will contain a name on each line. Put each of the names into an ArrayList. After you have put all of the names into the ArrayList search through
Problems With Struts - Development process
Problems With Struts   Respected Sir , While Deploying Struts Application in Tomcat 5.0 ,using Forward Action.This can... resolve this problems. Thanks & Regards Akhtar
problems regrading .properties files
problems regrading .properties files  According to my struts application my i ve to register particular data into the DB..It will succefully registerd according to my validation condition which m placed in the validate mathod
jAVA BEGINNER PROBLEMS
jAVA BEGINNER PROBLEMS  I need the program that takes from standard input an expression without left parenthesis and prints the equivalent infix expression with the parenthesis inserted??? Like EXAMPLE: 1+2)3-4)5-6
problems in parsing the xml with the special characters
problems in parsing the xml with the special characters  Hi, I have a problem, in while parsing the xml with special characters apstrophe('). I am...(String input) { String result = ""; for (int i = 0; i < input.length(); i
Problems connecting to a database. Java/SQLite
Problems connecting to a database. Java/SQLite  `print("try { con = DriverManager.getConnection("jdbc:sqlite:db/Freepark.sqlite"); } catch... on an SQL database but i am having problems connecting to it, I think the problem
Java: Some problems in given condition
Java: Some problems in given condition   SIR, I want to get the values from the table( database), if any one of the column of the table value is 0. Then one alert should b printed in application using Java. If(att.getdata1()==0
start debugging problems related to the JDBC API
start debugging problems related to the JDBC API  How do I start debugging problems related to the JDBC API
output error
]; for (k=0;k } } if i enter "my name" as the input the output...output error  this is my program import java.io.*; public class separate { public static void main(String[] args)throws IOException
input box
input box  give me the code of input box in core java
input box
input box  give me the code of input box in core java
Output of flex
Output of flex  hi....... please provide the name of the output file. What is the output of flex applications? please rply ASAP........ Thanks
triangle output
triangle output  program to get the following output
Advertisements
 

 

 

DMCA.com