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



Home Answers Viewqa Java-Beginners Input and Output problems

Have Programming Question? Ask it here!
 
 
 


vivek
Input and Output problems
1 Answer(s)      5 years and 11 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
Dialog and Console Input-Output
Prev: Dialog Box Output | Next: Example: Captitalize Java NotesDialog and Console Input-Output  This is similar to the previous program, but it also gets input from the user. 1 2 3 4 5 6 7 8
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
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
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
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
Console Input-Output (Java 5)
Java NotesConsole Input-Output (Java 5) Java 5's java.util.Scanner class... input. System.out.println("What's your name, Earthling?"); name... output System.out.println("Take me to your leader, " + name
triangle output
triangle output  program to get the following output: * *   Hi Friend, Please specify the pattern properly. Thanks
output of the program
output of the program  public static int sum(List list) { int sum = 0; for ( Iterator iter = list.iterator(); iter.hasNext(); ) { int i = ((Integer)iter.next()).intValue(); sum += i; } return sum
What is the output if....
What is the output if....  Here is my code. what is the output...");   When we put 50 as a lower limit value, output comes: Entering... as a lower limit value, output comes: Entering the try block. Exiting the try block
What will be the Output?
What will be the Output?  int[] number = {5,3,6,10,1} int temp; for (int i=0; inumbers[j]) { temp=numbers[i]; numbers[i]=numbers[j] number[j]=temp
xml output
xml output  generate an xml output in the following format <FileCount> <DOC>AA <RTF>BB <PDF>CC <Total>DD where AA=total number of .DOC files found BB=total number of .RTF files found,etc
Array and input
to input one of the above numbers then i want to print the array without the number user input. how will i do tht
what will the output
= (Parent) sonu; p.play(); What will be the output of above section of code
what is the output?
what is the output?  public class MyAr{ public static void main(String argv[]) { int[] i=new int[5]; System.out.println(i[5]); } }   It gives ArrayIndexOutOfBoundsException as you haven't add element to array. Correct
nsstring get value - algebra multiplication problems
nsstring get value - algebra multiplication problems  NSString Algebra multiplication problems How can i get value of X using algebra multiplication problems in nsstring? if i have two values.. 3 + 8 + X = ? Thanks
keyboard input
keyboard input  how do I use JOptionPane to accept keyboard input? I know how to import but not specific command on input line   import javax.swing.*; class JOPtionPaneExample { public static void main(String
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
how to get following output
how to get following output  input 123456 output 1 2 3 4 5 6
JLabel for output
Java: JLabel for output Why using JLabel for output is usually bad... idea after the user interface is already displayed. For output JTextField is often a better choice. The use of JLabel for output is mentioned because some
Mysql Date Input
)); ?> The input : <? echo $input; ?><br> The output : <? echo $date; ?>  Output : The input... Mysql Date Input      
Java Command Line Input
this code you will find the output as Please Input A Number 2 data is- 2...Java Command Line Input  How to get input from command line in java... System.out.println("Please Input A Number"); BufferedReader br
store input and display previous input as well current input. in jsp
store input and display previous input as well current input. in jsp  Hi Friend, In this JSP program i want display the previous input as well current inputs also. currently only current input i am able to display whenever i
How to create an input box?
How to create an input box?  How to create an input box
 

 

 

DMCA.com