SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Buffer

  1. #1
    PEACE WILL WIN abalfazl's Avatar
    Join Date
    Feb 2005
    Location
    Beyond the seas there is a town
    Posts
    711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Buffer

    Code:
    
    import java.io.*;
    
    public class Main {
    
        
        public static void main(String[] args) throws IOException{
    
          
            FileInputStream in = null;
            InputStreamReader inchar=null;
            BufferedReader bufferchar=null;
    
            try {
                in = new FileInputStream("myfile1.txt");
    
               inchar = new InputStreamReader(in,"UTF8");
    
               bufferchar= new BufferedReader(inchar);
    
            System.out.println("Text from file ");
    
            //Reads a single character.
            System.out.println(inchar.read());
    
              
                
                
            } finally {
                
                    inchar.close();
                
    
            }
        }
    
    }

    Buffer is region in memory that saves data temporary.It makes faster reading data.Now my question is how many characters can be saved in Buffer?
    I shall build a boat,I shall cast it in the water,
    I shall sail away from this strange earth,
    Where no one awaken the heroes in the wood of love

  2. #2
    SitePoint Wizard silver trophy rushiku's Avatar
    Join Date
    Dec 2003
    Location
    A van down by the river
    Posts
    2,056
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

  3. #3
    PEACE WILL WIN abalfazl's Avatar
    Join Date
    Feb 2005
    Location
    Beyond the seas there is a town
    Posts
    711
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is my 600th post in this forum.I appreciate your help and other friends.I learned many things in this forum.Thank you very much!
    I shall build a boat,I shall cast it in the water,
    I shall sail away from this strange earth,
    Where no one awaken the heroes in the wood of love


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •