Thank you,sharkura,I've solve the IO problem myself

finally, I figure it out
if you try to use FileReader to read the java program you are writing ,you will get in trouble.
as I mentioned before,I get confused when I use FilreReader to read sth written by FileOutputStream(which should write binary file) and it also works, but actually when I use fileOutputStream to write, the input content have already defined as int or some specific data type by me before, and the data type has already encoding it ,thus it is not pure binary file, when we input it , it can be decoded into the primitive type again . However it looks like that FileOutputStream has done the encoding to it.

FileInputStream obtains input bytes from a file in a file system
FileReader is a Convenience class for reading character files.
So you can use FileInputStream to load any file, in any format - txt, jpg, gif
FileReader should only be used on plain text files. It won't work trying to read in image data :-)

Similar Messages

  • I have the following Imac and Iphoto 11 in Finder folder I upgrade the iphoto file  and  all the latest event files, can you help how to solve the problem? Thank you  Model Name iMac    Model Identifier:     iMa

    I have the following Imac and Iphoto 11 in Finder folder I upgrade the iphoto file  and I lost all the latest event files, can you help how to solve the problem? Thank you
    Model Name:     iMac
    Model Identifier:     iMac8,1   Processor Name:     Intel Core 2 Duo
    Processor Speed:     2.4 GHz

    http://support.apple.com/kb/HT2638?viewlocale=en_US&locale=en_US

  • I bought iphone 4 in US and i and other person not able to listen properly because on the time of conversation voice cracking and difficult to understand each others.so i would like to request you that please solve the above problem.i love my iphone.

    Sir,
    I bought iphone 4 in US.last 6 month me and other person not able to listen properly the voice because the voice is cracking.i have called earlier about the above problem and they said to upload the new verson 6.1.3 and it will be done but after loading this version still i am facing the same problem.so ,i would like to request you that please solve the above problem as soon as you can.I will be thankful to you.i love my apple Iphone.
    waiting for your earliest reply.
    thanks
    Rajeev Gupta

    Hello sir
    As you know about my iPhone 4 which has a problem of voice cracking so I would like to replace to other phone like IPhone 5s.I will pay the replacement charges immediately.i am reaching miami on 19th of janvary 2014 so I would like to request you please arrange my appointment on the Apple store,dadeland mall ,miami at 15.00pm as I will reach miami at 13.00pm and my flight to India at 19.00pm.
    Last time you told to replace at miami on 26th of September but without oppoimtment they have not entertained me.so I would like to request you that please arrange my appointment this time
    I will be thankful to you
    Rajeev Gupta

  • TS3212 Trying to download iTunes 10.7 in Windows 7 64-bit. When I click the download now button, it immediately goes to the "Thank you for downloading" screen, but the file has not downloaded. Popups unblocked. Any thoughts? Thanks!

    Trying to download iTunes 10.7 in Windows 7 64-bit. When I click the download now button, it immediately goes to the "Thank you for downloading" screen, but the file has not downloaded. Popups unblocked. Any thoughts? Thanks!

    I'd first try downloading an installer from the Apple website using a different web browser:
    http://www.apple.com/quicktime/download/
    If you use Firefox instead of IE for the download (or vice versa), do you get a working installer?

  • How do I solve the memory problem ( 5 beeps ) upon startup?

    hp compaq d530SFF,  how do I solve the memory problem (5 beeps ) upon start up?

    Hi:
    You already know the answer to that! 
    http://h30434.www3.hp.com/t5/Desktop-Lockups-Freezes-Hangs/when-I-try-to-boot-up-lighs-flash-red-and...
    Paul

  • HI ,We would like to ask you to help us with the following problem

    We would like to ask you to help us with the following problem. As usual we tried to post unmatched received advance payment which is subject to output VAT via transaction SM35. Normally we post the payment to account 501020 (Advances Received from Operating Activities), we generate output VAT by clicking on u201CSimulate Taxu201D. Then we simulate the document and four lines are automatically generated (please see the attached scan of such document posted recently):
    40           510000 (Trade Receivables - Receive from Bank)
    19           501020 (Advances Received from Operating Activities)
    50           400000 (Output Tax (Sales Tax Payable))
    40           405033 (Customer Advances VAT)
    However when we tried to post it today it is not possible and an error message u201CTax clearing account 405033 may not have open item managementu201D appears u2013 please see the scanned printscreen. This did not happen in the past.
    We would appreciate if you could solve it as soon as possible as we still need to post it to period 12.

    Hello
    You execute the t/code FS00 for G/l 405033 and go the control tab select tick in open item mgt under act mgt in co.code.
    Regards
    Avijit

  • Will the next IOS update 5.0.2 solve the batter problem of my iphone 4s?

    will the next IOS update 5.0.2 solve the batter problem of my iphone 4s?

    Let me check my Magic Eight Ball..... All signs point to "Yes"
    All kidding aside, We all hope so!!

  • Well I made all the changes you suggested & I still have the same problem

    ''locking this thread - please stay with your original thread - https://support.mozilla.com/en-US/questions/848178''
    I did make all the changes you suggested, & it still has the same
    problem! Ok coach what do we do next? PCH told me that pop-up
    blockers must be disabled in order to continue, what do you say?

    jscher2000 are you still there?

  • How to solve the setColor() problem with multithreading?

    My fractal program uses a custom number of threads to draw the complete image. If I use just 1 thread, the image looks clean, if I use more threads some pixels of the image gets other colors. The problem ist the painting code:
    g2d.setColor(col);
    g2d.drawLine(x, y, x, y);as it is necessary to first set the color of the graphics object and then draw the line. I can solve this pixel color problem by synchronizing the Graphics2D object:
    synchronized (g2d) {
      g2d.setColor(col);
      g2d.drawLine(x, y, x, y);
    }but this slows the code down to times where just 1 thread is calculating the image. Unfortunately, I can't find a draw() method that has a color parameter.
    I tried to divide the panel into multiple BufferedImages (1 for each thread) which solves the pixel problem but only the first BufferedImage get's drawn.

    I solved my problem now. My solution is to use a separate BufferedImage for each Thread. I still had a bug where i didn't transformed the x/y coordinates of the complete image to the shifted x/y coordinates of the single BufferedImages, so that the threads draw the image out of the visible area which looked like all threads after the first only had a black image. After adjusting teh coordinates, the fractal now gets drawn correctly. And boy it's much faster with multiple threads - even on single core systems. On a dual core system, using 10-20 threads about doubles the performance as both cores have work almost all the time until the fractal is finished. :-)

  • When apple will solve the wifi problem ?

    when apple will solve the wifi problem ?

    They keep trying, but haven't yet in all the time OS X has existed. Every version of OS X has had some WiFi issue with some group of users. The normal pattern is they release a fix for one group, and another group develops a new WiFi problem.

  • Thank you everyone I have restored the toolbar by  customizing toolbar

    Thank you everyone. I have restored Toolbar by customizing toolbar and resetting as default setting  

    this should have been posted in the thread pertaining to the question.  It was not necessary to create a new thank you post.

  • To solve the sound problem

    i have problem in my computer ,cause this get very slow after open 2 or 3 works

    Hi RashisR,
    Welcome to the HP Forums!
    I would like to take a moment and thank you for using the forum, it is a great place to find answers. For you to have the best experience in the HP forum, I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I am unsure if you are having an issue with your sound or your computer's performance is slow.
    Here is a link to Using Automated Troubleshooting (Windows 8).
    Please select the the correct option and follow the on screen prompts.
    There is  a link on the document for troubleshooting hardware and sound  windows 8.
    I am also including this document . Improving System Performance without Adding Memory (Windows 8).
    If you would like further assistance, please provide your exact model of HP computer and the results from any troubleshooting steps you have done. Please also confirm what Operating System you are running.
    How Do I Find My Model Number or Product Number
    Sparkles1
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the bottom right to say “Thanks” for helping!

  • TS1559 WIFI solutions proposed by Apple are not working. Does oneone how to solve the WIFI problems?

    Dear Apple.
    I was really happy with my iphone4s, IOS 6.0, great product amazing quality and posibilities BUT.......
    I updated from IOS 6.0 to 6.1.1. and the WIFI nightmare started.
    I waited for a new update to fix the WIFI problems and I updated my iphone 4s from 6.1.1. to 6.1.2. in order to solve these problems related with WIFI connections.
    But IOS 6.1.2. is even worst:
    - WIFI is not working at all. So I cannot download apps greater than 50MB.
    - Battery life is shorter than ever.
    - 3G goes in and out every minute.
    - When you operate the iphone4s you can realize that is hotter than before.
    These problems are unnaceptable and inconsistent with a high quality standard product.
    You can read a lot of blogs, I am not the only one.
    Please give us a solution as soon as possible.
    Best Regards
    AICITEL

    Thank you for your support.
    My router is a TL-WR740N, and I think it has only a 2.4-2.4835GHz antenna.
    So it seems that I have to keep on trying.
    I also tryed to rename the router, still nothing.
    Thank you anyway.
    FYI.
    4 puertos LAN de 10/100Mbps
    1 puerto WAN 10/100Mbps
    Botón
    Botón de configuración rápida de seguridad
    Botón de reinicio
    Suministro de Energía Externa
    9VDC / 0.6A
    Estándares Inalámbricos
    IEEE 802.11n*, IEEE 802.11g, IEEE 802.11b
    Antena
    omnidireccional fijo de 5dBi
    Dimensiones (Largo x Ancho x Alto)
    6.9 x 4.6 x 1.3 in. (174 x 118 x 33 mm)
    Frecuencia
    2.4-2.4835GHz
    Velocidad de Señal
    11n: Hasta 150Mbps (dinámico)
    11g: hasta 54Mbps (dinámico)
    11b: hasta 11Mbps (dinámico)
    EIRP
    <20dBm(EIRP)
    Sensibilidad de Recepción
    130M: -68dBm@10% PER
    108M: -68dBm@10% PER
    54M: -68dBm@10% PER
    11M: -85dBm@8% PER
    6M: -88dBm@10% PER
    1M: -90dBm@8% PER
    Funciones Inalámbricas
    Activar / Desactivar radio inalámbrica, WDS Bridge, WMM, estadísticas inalámbricas
    Seguridad Inalámbrica
    64/128/152-bit WEP / WPA / WPA2,WPA-PSK / WPA2-PSK
    Tipo WAN
    IP dinámica / IP estática / PPPoE /
    PPTP (Acceso dual) / L2TP (Acceso dual) / BigPond
    DHCP
    Servidor, cliente, lista de cliente DHCP,
    Reserva de dirección
    Calidad de Servicio
    WMM, Control de Ancho de Banda
    Redireccionamiento de Puertos
    servidor virtual, Port Triggering, UPnP, DMZ
    DNS Dinámico
    DynDns, Comexe, NO-IP
    Puerto de Transferencia VPN
    PPTP, L2TP, IPSec (ESP Head)
    Control de Acceso
    Control Parental, Control de Manejo Local, Lista de anfitriones, la Lista de acceso, manejo de reglas
    Seguridad Firewall (cortafuegos)
    DoS, SPI Firewall
    Dirección IP Filtro / Filtro de dirección MAC / filtro de dominio
    Conexiones de direcciones IP y MAC
    Management
    Control de acceso
    Manejo Local
    Manejo remoto
    Certificación
    CE, FCC, RoHS
    Contenido del Paquete
    TL-WR740N
    1 fijo antenas omnidireccionales
    Fuente de alimentación
    CD de recursos
    Guía de instalación rápida
    Requisitos del Sistema
    Microsoft ® Windows ® 98SE, NT, 2000, XP, Vista ™ o Windows 7, Mac ® OS, NetWare ®, UNIX ® o Linux.
    Ambiente
    Temperatura de funcionamiento: 0¿ ~ 40¿ (32¿ ~ 104¿)
    Temperatura de almacenamiento: -40¿ ~ 70¿ (-40¿ ~ 158¿)
    Humedad de funcionamiento: 10% ~ 90% sin condensación
    Humedad de almacenamiento: 5% ~ 90% sin condensación

  • Trying to solve the hashtable problem;

    this is a test of a part of my programming, trying to solve the hashtable
    i took out the erronous part and change some of it.i'm trying to print out a table of data with 4 column
    import java.util.*;
    public class test {
         // creating a global hashtable name "b" its
         //static just for the convieniet of it
    static Hashtable b = new Hashtable();
    public static void addItem(String keyid, String t, double p, int q){
    // array size of 4 for my value in hashtable "b"
    String [] array = new String [4];
    // puting all my variables into string array
    //including my keyid as the first in array[0]      
         array[0]=keyid;
         array[1]=t;
         array[2]= String.valueOf(p);//casting of double type to string
         array[3]= String.valueOf(q);//casting of int type to string
         b.put(id,array);//setting key = id and value = my array[]
    public static void main (String args[]) throws Exception {
         String numb = "009", piss="theone";
         double cost = 19.50;
         int a = 1;
         String [] testItem;
         addItem(numb,piss,cost,a); //call of method additem;
         Enumeration e = b.keys();
    // Get all values
    while ( e.hasMoreElements())
    {            tempItem = (String [])e.nextElement(); **// error msg here**
         System.out.println("array element 1"+tempItem[1]);
         System.out.println("array element 2"+tempItem[2]);
         System.out.println("array element 3"+tempItem[3]);
    this is my error msg "ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;"
    1 =====>cannot find symbol
    symbol  : variable id
    location: class test
            b.put(id,array);//setting key = id and value = my array[]
    2 ===>cannot find symbol
    symbol : variable tempItem
    location: class test
    tempItem = (String [])e.nextElement();
    3 ====>cannot find symbol
    symbol : variable tempItem
    location: class test
    System.out.println("array element 1"+tempItem[1]);
    is there anyway to solve this or anyone can provide me with an alternative way of printing a table with 4 col?

    you should learn to post your code inside code tags
    mangotree wrote:
    1 =====>cannot find symbol
    symbol : variable id
    location: class test
    b.put(id,array);//setting key = id and value = my array[]there is nothing called "id"
    mangotree wrote:
    2 ===>cannot find symbol
    symbol : variable tempItem
    location: class test
    tempItem = (String [])e.nextElement();
    3 ====>cannot find symbol
    symbol : variable tempItem
    location: class test
    System.out.println("array element 1"+tempItem[1]);there is nothing called "tempItem"
    mangotree wrote:
    this is my error msg "ClassCastException: java.lang.String cannot be cast to [Ljava.lang.String;"
    here you are iterating through the keys of the hash table ("b.keys()"), and your key is a String, not a String[; perhaps you want the value instead?

  • How to solve the certificate problems in Java Web Start

    Hi, All,
    I encounted these two problems recently:
    (1) I have an application which is supposed to be started by Java Web Start. I have written my own code which calls other .jar files from other companies. Since for web start, you need to sign all .jar files if you want more permssions. Now I got the following problem:
    '=================================
    An error occurred while launching/running the application.
    Title: My stuff
    Vendor: UCLA
    Category: Launch File Error
    JAR resources in JNLP file are not signed by same certificate
    =================================
    How to go around this? It seems that the .jar files from that company has been signed already. Then I tried to uncompress those jars and re-archieve again, then sign it again using the keystore I used to sign my own .jar files. It still does not work. Any help on this will be appreciated!
    (2) Afterr I signed a .jar file, when I want to run it again, using command: java -jar abc.jar
    It does not work any more, I am not sure whether it will become a problem if loaded by Web start.
    Thanks a lot!
    David

    In another forum answer, a user named Dietz suggested the following:
    If you have a library signed by another signer, you need to factor it out into a seperate extension jnlp file.
    AJones0131

Maybe you are looking for

  • Drag meeting to next week

    OK, here's something that should be totally simple:  Drag a meeting into next week (when looking at the week view in iCal). Evidently, Apple has not implemented active borders so that when you drag something to the edge of the window it scrolls the c

  • S-video to TiBook

    I have a Sony CCD-TRV118 Handycam that does not have a Firewire out port, but it does have an S-video and A/V outut port. Is there a cable that will connect from either of these to Firewire? Thanks in advance!

  • Migrating music and all iTunes info from pc to Mac

    I have just purchased my first Mac.. I have been totally unsuccessful migrating any information over. I have even selected single folders and 10 hrs later no luck. How do i get all of my itunes music,podcasts etc transfered over to my new Mac? Help p

  • Running an external program from a JSP

    Can anyone help me? I have the following code which works for simple commands such as "ls ./dirname " but not for larger programs. The code works with programs such as FASTA and BLAST in standalone Java programs, but not in a JSP. String s = "Path of

  • Can LV7.1 german create an application with english language

    Hallo, I'm working with labview 7.1 german version and like to create an application with english language. The main problems are the menus of the control elements (right click mouse) for instance x/y diagrams or knobs. Can anyone help me? Thanks, Mi