IProblems=Can't read from/write to and Flipping through songs

Yeah I'm getting the error "Can't read from or write to.", and the iPod itself will turn on, but when I put it on a playlist or album, it starts flipping through all the songs before it even gets a chance to play part of the songs. What gives?

Please do a Restore - which erase all the music on your iPod.
http://www.apple.com/support/ipod/five_rs/

Similar Messages

  • How can I read from a file line by line?

    Hi!
    Could someone post some code or explain how can I read from a file, and want I to read a line each time. How can I go to line number N?
    Thanks

    hi,
    u can try this:
    try     {
          // open text file
          BufferedReader in = new BufferedReader(new FileReader(fileName));
          String line=in.readLine();
          while((line=in.readLine()) != null) {
          System.out.println(line);
          }The go to line number N i m not so sure.
    Cheers
    Jerry

  • Can't read or write some files, internet is failing, youtube won't load, software I tried to install was in Slovenian, not dutch or english like in my systempreferences settings, pictures and files won't preview with spacebar, etc. Malware?

    Specs:
    iMac 10.8.5
    3,4 GHz Intel Core i7
    32 GB 1600 MHz DDR3
    Can't read or write some files, internet is failing, youtube won't load, security software I tried to install was in Slovenian, not dutch or english like in my systempreferences settings, pictures and files won't preview with spacebar and are randomly corrupted, when I entered something in the Youtube searchbar (when it was still working) it send me to a site with sexadds.
    I tried restart my iMac and when I was logged back in, my dock preferences were reset.
    Also tried to download some security software to check my Mac for malware, but when I did, I tried several, I got a notification that said something like 'dumpfiles (don't know if this is the right translation...) damaged'.
    I'm taking screenshots from all the weird notifications I get and even three quarters off the screenshots I took in the last three hours are already unreadable.
    It started this morning when I tried opening a Premiere Pro file on which I worked the night before.
    When I tried opening it, it said the file was damaged and could not be openend.
    I tried opening it with AE or importing the file in a new project but nothing helped.
    When I tried looking for autosaves, this is the really weird part, there were none.
    Even though there are autosaves from my other projects, this one was completely gone.
    It looked like the day before never happened on my computer.
    Also when I openend Premiere all the recent projects had been wiped.
    So at first I thought it was a Premiere Pro failure.
    But than, later on the day, I tried loading some RAW files from my compact flash card.
    This is where I would get an error (error -36) which said some data cannot be read or written.
    I tried importing the files with a view different technics, from dragging to importing via Lightroom and I succeeded with Image Browser.
    But when I tried moving the files to an other folder the same error occurred.
    While dealing with this issue I wanted to put on some soothing music on youtube.
    This is when the next weird thing occurred: youtube wasn't completely loading in Chrome. I refreshed a view times, checked the internet connection and still no difference.
    When I tried in Safari it did work but when I clicked enter on the searchbar in Youtube, a page with sexadds appeared (I didn't install AdBlock in Safari...).
    I read about this 'phishing' where you are redirected to a site were a possible malware installment can take place...
    I don't know if it's connected to any of the problems I've been having but I just never experienced this on a mac, I have been a Mac user for 10 years now.
    On top of it all, internet started working worse and worse and now it's not even working at all. I had to fill in the password over and over, normally it remembers.
    Just like my system preferences, all the preferences I had with Chrome where also reset.
    Also somewhere in between I got this notification: Mac OS X must restore library to run programs. Type your password to allow.
    To me this is all very weird and suspicious. I have clearly no idea what's going on. Could this be another sort of trojan horse or malware?
    Some background info which could be helpful for solving this mystery:
    two months ago the one year old Fusion Drive in my iMac just broke out of nowhere.
    I got it replaced by a qualified apple repair store.
    When I got my computer back, all the files where gone.
    I got on the internet without AdBlock installed yet.
    A game or whatever it was, can't clearly remember, got installed by accident.
    I deleted it immediately.
    Only two weeks later, I couldn't log in to my account. It didn't recognize my password and username. 
    So I brought my mac back to the store.
    Here the repair guy said it was a minor thing and he just needed to reconnect my account. He also mentioned he found a downloaded game name Sparta and it probably had something to do with the error.
    I asked him; could it be a virus? He replied no way.
    I don't know why I couldn't be a virus, just because it's a mac doesn't mean it cannot be done.
    So today I tried installing anti virus software (such as avast- was in a weird language looked like slovenian, clamxav - was in slovenian) but I couldn't install them.
    PLEASE help me! I don't know what to do anymore, I work fulltime and I need my computer, I have no time to bring it in for repair, are there other perhaps easier ways?
    Could this be the work of a virus or a malware? Or is it a disk permissions issue?

    It sounds like you may have multiple problems, but none of them are likely to be caused by malware.
    First, the internet-related issues may be related to adware or a network compromise. I tend to lean more towards the latter, based on your description of the problem. See:
    http://www.adwaremedic.com/kb/baddns.php
    http://www.adwaremedic.com/kb/hackedrouter.php
    If investigation shows that this is not a network-specific issue, then it's probably adware. See my Adware Removal Guide for help finding and removing it. Note that you mention AdBlock as if it should have prevented this, but it's important to understand that ad blockers do not protect you against adware in any way. Neither would any kind of anti-virus software, which often doesn't detect adware.
    As for the other issues, it sounds like you've got some serious corruption. I would be inclined to say it sounds like a failing drive, except it sounds like you just got it replaced. How did you get all your files back after the new drive was installed?
    (Fair disclosure: I may receive compensation from links to my sites, TheSafeMac.com and AdwareMedic.com, in the form of buttons allowing for donations. Donations are not required to use my site or software.)

  • Can't read or write from iPod when it syncs with a big library

    When I try to sync with my 50Gb size library in the iTunes installed on my iBook G4 (10.4.11), it appears "can't read or write from the ipod", in the middle of the synchronization. It starts to do the job very well, but when it has done only 6 or 8 Gb, the process got slower until it appears such message. I have iTunes 7.6 and ipod firmware 1.1. I have tried on Windows and Mac plattforms, trying all the combinations (Mac and/or Win formats) and the trouble persists. The device has only two weeks of use, and it was working perfectly until now. The problem it is the same if I do it manually (no automatic sync). I am not sure if the problem is defective hardware, does anybody have any idea or have similar problem? Thanks.

    Thanks a lot for your answer. The idea of an increasing autoplaylist it is pretty good. I did it, in 5 Gb steps, and in the thrid step (10 Gb done), when it only has copied almost one Gb, the error message pop up again. Before the message appears, iTunes become slower and slower copyng each song until it stops in one song, and after a while, message appears. After, the system come down, almost blocked, and it takes a long until I can mount the ipod again. Of course, ipod restarts automatically and the songs copied in the last step are not there. I was taking care in every moment of the process, avoiding to leave the system suspend alone (and also turning off all the saving energy options). I am now pretty sure that the problem is on the device. Anyway, thank you very much for your valuable ideas.

  • "Can't read from or write to disk...." iPod error

    I recently switched from my old PowerBook G4 (running Leopard 10.5.2) to a newer MacBook Pro (running Leopard 10.5.5). I migrated my account and permissions from the PB to the MacBook Pro, and everything is working just fine except for iTunes (version 8.0.2) and my older 160 GB iPod Classic (running 1.1.2).
    NOTE: THE VERSION OF iTunes ON THE PB WAS VERSION 8.0.1.
    Since the migration, I've been getting this "can't read from or write to disk..." error whenever I attempt to sync my iPod to iTunes. Previously, I'd never had any problems. I have tried to restore the iPod using iTunes - didn't work. I have tried different USB to dock connector cables - didn't work. I have even tried completely re-formatting the iPod using Disk Utility - didn't work. Everytime I begin syncing the iPod, it starts out just fine. At varying degrees of completion it ALWAYS fails with the same error.
    I had an idea. I tried syncing the iPod to a different computer - my G5 4 x 2.5 GHz (running Leopard 10.5.5) with iTunes (version 8.0.2). I still got the same error. I haven't dropped it, submerged it in water or done anything to it that would otherwise compromise its functionality. So, I'm at a loss.
    PLEASE! PLEASE! PLEASE!
    Does anyone have any other suggestions? - OTHER THAN BUYING A NEW IPOD

    UPDATE:
    OK, after the visit to my Genius Bar; I thought of a variable that wasn't previously considered. Because their transfer of media was successful without the slightest hitch, I had to figure out something else.
    Everytime I had tried to sync the iPod with my various Macs, I was using the same process. Since all of my music and movies "live" on an external 500 GB drive, I was attempting to use that same drive whenever I would try to sync. It occurred to me that possibly the failing was in the drive and not the iPod.
    I have part of that library on a Power Mac G4 867 DP (running 10.4.9). I updated the iTunes on that machine to 8.0.2, connected the iPod and made a successful transfer of a large amount of media!
    My only problem now is that I can't figure out how to get the 500 GB drive to stop hanging on transfer and update of my Genius information. The drive just completely stalls and I get the spinning wheel from iTunes and the application ceases to respond. When I force quit iTunes, the drive recovers fine. I don't have any problems transferring data to and from it and Disk Utility reports that the drive is healthy.
    I have tried re-installing iTunes on all affected Macs - didn't help. I believe my problem may exist in the iTunes Library file or in the associated .xml document. My only concern is that if I do a completely fresh install of iTunes where those files would be re-created, I would lose all of my play and ratings data as well as the information about when my files were added. On a related note, when playing the music from this drive through iTunes. I don't have any issues at all.
    ANY SUGGESTIONS?

  • How to  read from excel file and write it using implicit jsp out object

    our code is as below:Please give us proper solution.
    we are reading from Excel file and writing in dynamicaly generated Excel file.it is writing but not as original excel sheet.we are using response.setContentType and response.setHeader for generating pop up for saveing the original file in to dynamically generated Excel file.
    <%@ page contentType="application/vnd.ms-excel" %>
    <%     
         //String dLoadFile = (String)request.getParameter("jspname1");
         String dLoadFile = "c:/purge_trns_nav.xls" ;
         File f = new File(dLoadFile);
         //set the content type(can be excel/word/powerpoint etc..)
         response.setContentType ("application/msexcel");
         //get the file name
         String name = f.getName().substring(f.getName().lastIndexOf("/") + 1,f.getName().length());
         //set the header and also the Name by which user will be prompted to save
         response.setHeader ("Content-Disposition", "attachment;     filename="+name);
         //OPen an input stream to the file and post the file contents thru the
         //servlet output stream to the client m/c
              FileInputStream in = new FileInputStream(f);
              //ServletOutputStream outs = response.getOutputStream();
              int bit = 10;
              int i = 0;
              try {
                        while (bit >= 0) {
                        bit = in.read();
                        out.write(bit) ;
    } catch (IOException ioe) { ioe.printStackTrace(System.out); }
              out.flush();
    out.close();
    in.close();     
    %>

    If you want to copy files as fast as possible, without processing them (as the DOS "copy" or the Unix "cp" command), you can try the java.nio.channels package.
    import java.nio.*;
    import java.nio.channels.*;
    import java.io.*;
    import java.util.*;
    import java.text.*;
    class Kopy {
         * @param args [0] = source filename
         *        args [1] = destination filename
        public static void main(String[] args) throws Exception {
            if (args.length != 2) {
                System.err.println ("Syntax: java -cp . Kopy source destination");
                System.exit(1);
            File in = new File(args[0]);
            long fileLength = in.length();
            long t = System.currentTimeMillis();
            FileInputStream fis = new FileInputStream (in);
            FileOutputStream fos = new FileOutputStream (args[1]);
            FileChannel fci = fis.getChannel();
            FileChannel fco = fos.getChannel();
            fco.transferFrom(fci, 0, fileLength);
            fis.close();
            fos.close();
            t = System.currentTimeMillis() - t;
            NumberFormat nf = new DecimalFormat("#,##0.00");
            System.out.print (nf.format(fileLength/1024.0) + "kB copied");
            if (t > 0) {
                System.out.println (" in " + t + "ms: " + nf.format(fileLength / 1.024 / t) + " kB/s");
    }

  • Contacts are there, but can't read anything in it, and can't write either.

    Hello,
    Contacts are there, but i can't read anything in it, and can't write either.
    The place where i should read Name, Family Name, mail adress, phone, etc is EMPTY ! All white ! The card got hos name, but there is nothing in.
    I started to use my mac book and adress book too.
    I use mac os X since the beginnning, and i never had this problem with it.
    Can someone help me please !
    Thanks

    Sounds like the Font Cache has a corrupt font in it.
    Try this:
    http://www.ehow.com/how_7197467_rebuild-font-cache.html
    If that one doesn't work, it could be the WPF font cache
    http://support.microsoft.com/kb/937135
     You'll have to delete the .dat files in C:\Windows\ServiceProfiles\LocalService\AppData\Local and restart the computer.

  • How can one  read a Excel File and Upload into Table using Pl/SQL Code.

    How can one read a Excel File and Upload into Table using Pl/SQL Code.
    1. Excel File is on My PC.
    2. And I want to write a Stored Procedure or Package to do that.
    3. DataBase is on Other Server. Client-Server Environment.
    4. I am Using Toad or PlSql developer tool.

    If you would like to create a package/procedure in order to solve this problem consider using the UTL_FILE in built package, here are a few steps to get you going:
    1. Get your DBA to create directory object in oracle using the following command:
    create directory TEST_DIR as ‘directory_path’;
    Note: This directory is on the server.
    2. Grant read,write on directory directory_object_name to username;
    You can find out the directory_object_name value from dba_directories view if you are using the system user account.
    3. Logon as the user as mentioned above.
    Sample code read plain text file code, you can modify this code to suit your need (i.e. read a csv file)
    function getData(p_filename in varchar2,
    p_filepath in varchar2
    ) RETURN VARCHAR2 is
    input_file utl_file.file_type;
    --declare a buffer to read text data
    input_buffer varchar2(4000);
    begin
    --using the UTL_FILE in built package
    input_file := utl_file.fopen(p_filepath, p_filename, 'R');
    utl_file.get_line(input_file, input_buffer);
    --debug
    --dbms_output.put_line(input_buffer);
    utl_file.fclose(input_file);
    --return data
    return input_buffer;
    end;
    Hope this helps.

  • "Can't Read Or Write to disk" Video Won't Transfer To Ipod

    I have transfered videos to my ipod in the past but I have two tv shows from the Itunes story that won't transfer.
    They are in the correct mpeg 4 whatever format. My itunes is the most resent version, but for some reason I keep getting the same error.
    "Cannot Read Or Write To Disk".
    HELP??!!
      Windows XP  

    I've got this problem too. My 5g iPod 30gig syncs after about 3 minutes with iTunes then after loading songs and videos after 10 minutes i get the same message your getting - "Can't Read Or Write to disk". I think theres some kind of USB2 conflict or something. All my other USB devices work fine. All my drivers and software is up-to-date.

  • Help. External Hard drive "In use," can't read or write

    I was copying files from my iMac desktop to an external drive that I have been using for years. Suddenly, the drive didn't complete the operation. Now I can't read or write. Permissions seem fine. Tried to verify and repair in disc utility, but got a "unable to unmount disc" message. Then drive has to be force ejected. Rebooting is stalled until I unplug the drive. Can't even create a disc image of it. Tried booting in safe mode to do Disc Utility - no dice. Any help? Desparate.
    Douglas

    Oh... in use... see if Spotlight or Time Machine is trying to use it.
    Open Console in Applications>Utilities & see if there are any clues or repeating messages when this happens.

  • Since I upgrade to Lion OS my optical drive stop working can't read or write at all I did what I could to fix it but still not working , any help please

    Since I upgrade to Lion OS my optical drive stop working can't read or write at all I did what I could to fix it but still not working , any help please

    It sounds like you may have multiple problems, but none of them are likely to be caused by malware.
    First, the internet-related issues may be related to adware or a network compromise. I tend to lean more towards the latter, based on your description of the problem. See:
    http://www.adwaremedic.com/kb/baddns.php
    http://www.adwaremedic.com/kb/hackedrouter.php
    If investigation shows that this is not a network-specific issue, then it's probably adware. See my Adware Removal Guide for help finding and removing it. Note that you mention AdBlock as if it should have prevented this, but it's important to understand that ad blockers do not protect you against adware in any way. Neither would any kind of anti-virus software, which often doesn't detect adware.
    As for the other issues, it sounds like you've got some serious corruption. I would be inclined to say it sounds like a failing drive, except it sounds like you just got it replaced. How did you get all your files back after the new drive was installed?
    (Fair disclosure: I may receive compensation from links to my sites, TheSafeMac.com and AdwareMedic.com, in the form of buttons allowing for donations. Donations are not required to use my site or software.)

  • Can not read or write to mac hard drive error

    When attempting to transfer music files from an external usb harddrive formatted in windows into Itunes, I can only successfully import a small fraction of the music, and then its stops with a error, that the Mac HD can not read or write files.

    It's possible the file names have some 'funky' characters in them that the Mac doesn't like ?
    What format is the external drive ?

  • How do i read from/write to FieldPoint modules in LabView 8.5?

    Is there a new way to read from/write to FieldPoint modules in LabView 8.5?  I made a .vi in LabView 8.0 using the FieldPoint icon under 'Measurement I/O' on the Functions Palette (to read from and write to different modules), but now, after transferring the program to a new computer with LabView 8.5, those icons are not listed under 'Measurement I/O'.  The FieldPoint items do show up in MAX so I know that they're connected properly. 
    Did I miss something when installing the new LV 8.5? 
    Any help would be appreciated.
    Thanks!

    Hello,
    As Mike said, it is important to reinstall any drivers that you need, such as FieldPoint, after
    installing a new version of LabVIEW so that the new version of LabVIEW will contain the necessary functions for communicating with your specific hardware.  The same goes for any toolkits or software modules that you may have. 
    Currently, only FieldPoint
    6.0 installs support for LabVIEW 8.5.  The installer for FieldPoint 6.0 is packaged with the August 2007, November 2007, and February 2008 Device Driver CDs that shipped with LabVIEW.  The February 2008 Device Driver CD can also be found online at:
    http://joule.ni.com/nidu/cds/view/p/id/991/lang/en
    You will notice on the FieldPoint
    5.0.1 installer there are only support options for LabVIEW versions up
    to 8.2.1.
    Take care!
    FieldKam
    Kameralina
    Ask NI (ni.com/ask)
    Search The KnowledgeBase
    NI Developer Zone
    Measure It. Fix It. ni.com/greenengineering/
    NI Vision ni.com/vision/

  • Ipod Touch message "itunes can neither read nor write to "my Name" disk.

    While syncing my Touch on I- Tunes, everything stopped and the message was "can neither read or write to B-----J-----"s ipod disk. I was on the phone for hours with Apple support, sent the Touch back twice to no avail. Finally found a newly acquired song from I-tunes stopped the sync in its' tracks and could not be recovered from. Has anyone else had this problem?

    I have a second gen which I received today as a replacement from Apple as they thought that might solve my problem. I found a recently acquired song, David Gilmore's "Where We Start " caused the crash. I did a manual load of the touch after a restore of it"s software and tunes. I watched the computer screen as I updated several songs at a time. I recreated the problem three times so I am confident I know what caused it but the only way I know around it is the slow process of a manual update. I have reported it to Itunes because this has taken me two weeks to figure out.

  • J2ME: Can't read from input stream?

    I'm trying to create a simple message service between a server and J2ME client. But everytime I try to read from DataInputStream (dis) i get Exceptioons. How come? It works just fine to send messages to OutputStream.
    I've tried several different methods... This is my latest try (client). You'll find the server below.
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    public class clientMIDlet extends MIDlet implements CommandListener {
    private Command exitCommand;
    private Command sendCommand;
    private Command receiveCommand;
    private Command clearCommand;
    protected Display display; // The display for this MIDlet
    protected TextBox textBox;
    final int MAX_LENGTH = 2048;
    private ContentConnection connection = null;
    private OutputStream os = null;
    private DataInputStream dis = null;
    StringBuffer buffer = new StringBuffer("");
    public clientMIDlet() {
    // Max lenght of received messages
    display = Display.getDisplay(this);
    exitCommand = new Command("Exit", Command.EXIT, 1);
    sendCommand = new Command("Send", Command.SCREEN, 1);
    receiveCommand = new Command("Receive", Command.SCREEN, 1);
    clearCommand = new Command("Clear", Command.SCREEN, 1);
    private void sendMess (final String message) {
    String msg = message + "\n";
    try {
    os.write(msg.getBytes());
    os.flush();
    } catch (IOException e) {
    System.err.println("Error in sendMess while sending " + msg);
    private String getMess() throws IOException {
         int c;
         try {
         System.out.println("encoding: "+ connection.getEncoding());
         System.out.println("lenght: "+ connection.getLength());
         System.out.println("type: "+ connection.getType());
    System.out.println("Using buffer.. This row never prints..");
         try {
              for (int ccnt=0; ccnt < connection.getLength(); ccnt++) {
              c = dis.read();
              buffer.append((char)c);
    } finally {
              dis.close();
    } catch (IOException x) {
    System.out.println("Problems with data connection");
    return buffer.toString();
    * Start up the Hello MIDlet by creating the TextBox and associating
    * the exit command and listener.
    public void startApp() {
    // Start a socket to comminicate with the server.
    // Server variables.. Should be submited by the user
    String host = "192.168.1.20";
    String port = "7080";
         String serverName = "socket://" + host + ":" + port;
    // Connect to server in order to receive response string
    try {
         connection = (ContentConnection)
              Connector.open(serverName,Connector.READ);
    } catch (Exception e) {
    System.out.println("Failed to connect to server!!!");
    try {
         System.out.println("encoding: "+ connection.getEncoding());
         System.out.println("lenght: "+ connection.getLength());
         System.out.println("type: "+ connection.getType());
    dis = connection.openDataInputStream();
    } catch (Exception e) {
    System.out.println("Can not read from connection");
    textBox = new TextBox("Hello MIDlet", "Hello!", 50, TextField.ANY);
    textBox.addCommand(exitCommand);
    textBox.addCommand(receiveCommand);
    textBox.addCommand(sendCommand);
    textBox.addCommand(clearCommand);
    textBox.setCommandListener(this);
    display.setCurrent(textBox);
    * Pause is a no-op since there are no background activities or
    * record stores that need to be closed.
    public void pauseApp() {
    * Destroy must cleanup everything not handled by the garbage collector.
    * In this case there is nothing to cleanup.
    public void destroyApp(boolean unconditional) {
    * Respond to commands, including exit
    * On the exit command, cleanup and notify that the MIDlet has been destroyed.
    public void commandAction(Command c, Displayable s) {
    if (c == exitCommand) {
    destroyApp(false);
    notifyDestroyed();
    } else if (c == receiveCommand) {
    try {
    System.out.println(getMess());
    //textBox.setString(getMess().toString());
    } catch (Exception e) {
    System.err.println("Could not write message to display");
    } else if (c == sendCommand) {
    sendMess(textBox.getString());
    textBox.setString("Message sent");
    Server:
    import java.net.Socket;
    import java.net.ServerSocket;
    import java.io.IOException;
    import java.io.BufferedReader;
    import java.io.PrintWriter;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    class User {
         private Socket socket;
         private BufferedReader in = null;
         private PrintWriter out = null;
         public User(final Socket mySocket) {
              this.socket = mySocket;
              try {
                   in = new BufferedReader(
                   new InputStreamReader(
                        this.socket.getInputStream(), Server.CS));
                   out = new PrintWriter(
                   new OutputStreamWriter(
                        this.socket.getOutputStream(),Server.CS));
              } catch(IOException e) {
    System.out.println("Server could not create user sockets");
         public String get() {
              String response = null;
              try {
                   response = in.readLine();
              } catch(IOException e) {
    System.out.println("Server could not read response");}
              return response;
         public void put(final String response) {
              out.print(response);
    out.flush();
         public void finalize() {
              try {
                   in.close(); out.close(); socket.close();
              } catch (IOException e) {;}
    class ConnectionHandler implements Runnable {
         private final User[] users;
    private String chatString;
         public ConnectionHandler(final Socket socket_user1, final Socket socket_user2) {
              users = new User[] {new User(socket_user1), new User(socket_user2)};
              //:Send users their initial state:
         public void run() {
    boolean master = true;
    users[0].put("OK");
              users[1].put("wait");
    System.out.println("ConnectionHandler started.");
              while(true) {
    chatString = users[(master ? 0 : 1)].get();
    System.out.println("User" + (master ? 1 : 2) + ":" + chatString);
                   users[(master ? 1 : 0)].put(chatString);
                   master = !master;
    public class Server {
         public final static String CS = "ISO-8859-1";
    public static void main(String[] args) throws IOException {
              int port = 7070;
    if (args.length == 1) {
    port = Integer.parseInt(args[0]);
         System.out.println("Server started on port " + port + "...");
    final ServerSocket serverSocket = new ServerSocket(port);
              while(true) {
    final Runnable task = new ConnectionHandler(serverSocket.accept(),
    serverSocket.accept());
              final Thread thread = new Thread(task);
              thread.start();
    }

    You've got to be kidding me...
    I'm trying to create a simple message service between
    a server and J2ME client. But everytime I try to read
    from DataInputStream (dis) i get Exceptioons. How
    come? It works just fine to send messages to
    OutputStream.What exceptions get thrown? What line numbers do they get thrown from? Do they always get thrown, or only in certain situations? Put your code in [code ] blocks (http://forum.java.sun.com/faq.jsp#messageformat, for Christ's sake, how many times do people need told to do that... it should just be written write on top of the page that you type your posts in... oh wait... IT IS!)

Maybe you are looking for