Writing file proving problematic

Hi,
I have a 2D array that I have stored as a string. I have checked it's out put and it looks very much like it should. It is a 2D array of ints representing the solution to a maze, so it looks something like this:
5 1 1
5 1 1
5 5 3
with 5s being legal moves and 3 being the exit. I've tried every way I know to get this thing to write to a file in this format and I keep tripping on some new line character problem. The output in the file always looks like this: 5 1 1[]5 5 1[]1 5 3
with [] being displayed where the \n should be. Also, when I copy and pasted that in here it displayed it correctly. Anyway, here is my most recent attempt:
public void write(String filename, int[][] maze) {
          String solution = mazeToString(maze);
          try {
               FileWriter writer = new FileWriter(filename);
               BufferedWriter buffWriter = new BufferedWriter(writer);
               buffWriter.write(solution);
               buffWriter.close();
          catch (IOException e) {
          System.out.println(e);
P.S.: What is the code formatting tag for this B.B.? I can never remember

I fixed it. When creating the String for my new line character I did '"\r\n" instead of what I had "\n".

Similar Messages

  • Error reading/writing file "com.garageband.cs":`≤Ć». message

    Hey all! Don't know if anyone can help but I keep getting the message...
    " Error reading/writing file "com.garageband.cs":`≤Ć». " with a cancel button.
    If you click on it it does go away, but after a time playback starts skipping and stuff.
    Anyone help please?
    Thanks
    Righini

    first two things to try for “oddball” probs:
    http://www.bulletsandbones.com/GB/GBFAQ.html#oddballprobs
    (Let the page FULLY load. The link to your answer is at the top of your screen)

  • Error reading/writing file message when opening garageband and/or files

    I've been recently getting this message when I open garageband and files
    "Error reading/writing file\U201Ccom.apple.garageband.cs\U201D
    I've been in and repaired disk permissions and all that it says it is all fine, reinstall garageband and message still comes up, weird.
    not only is garageband being a nuisance, Mac OS X 10.6.2 is being a pain when shutting down telling me to restart the computer. This only happened since upgrading to 10.6. No one as yet knows this promble so I'm gonna have to ring apple and see what is going on here.
    and also my other problem is that mac doesn't seem as snappy anymore I noticed this before upgrading to 10.6 and made no difference when "cleanly" installing 10.6. I get a colour wheel popping up and i'm having to wait with simple tasks. iMac only 2 years old.

    i give up with this discussion forum no no one knows anything

  • File Adapter not writing file when processed from one node in a clustered environment

    In our environment, we have 4 server nodes running. We are using a file adapter to write file to a location in the server. the adapter is writing files when its processing data in all nodes except one.
    Below is the JCA File
    <connection-factory location="eis/FileAdapter" adapterRef=""/>
    <endpoint-interaction portType="Write_ptt" operation="Write">
    <interaction-spec className="oracle.tip.adapter.file.outbound.FileInteractionSpec">
    <property name="PhysicalDirectory" value="/data/prd"/>
    <property name="FileNamingConvention" value="Sample.dat"/>
    <property name="Append" value="true"/>
    </interaction-spec>
    </endpoint-interaction>
    the File Adapter health is running OK. What would be the potential cause

    In our environment, we have 4 server nodes running. We are using a file adapter to write file to a location in the server. the adapter is writing files when its processing data in all nodes except one.
    Below is the JCA File
    <connection-factory location="eis/FileAdapter" adapterRef=""/>
    <endpoint-interaction portType="Write_ptt" operation="Write">
    <interaction-spec className="oracle.tip.adapter.file.outbound.FileInteractionSpec">
    <property name="PhysicalDirectory" value="/data/prd"/>
    <property name="FileNamingConvention" value="Sample.dat"/>
    <property name="Append" value="true"/>
    </interaction-spec>
    </endpoint-interaction>
    the File Adapter health is running OK. What would be the potential cause

  • 10.6.8 update would not finish writing files

    I am trying to update my os from 10.6.7 to current 10.6.8 but the installation process ( writing files) would not finish !!
    The progress bar seems to be stuck at about 95%
    How do I resolve this ?
    I need to d/l lion

    Hi,
    Some Users have reported that Powering down their Router/Modem... Then Powering it up again and then re-downloading the Update has worked... You could try that...
    Here's the link for the Combo Update should you need it:
    http://support.apple.com/kb/DL1399
    Hope this Helps,
    Cheers,

  • Keep getting message pop up "Error reading/writing file  "com.apple.logic.pro.cs": Logical end-of-file reached during read operation," and "The Preferences are not loaded completely. Save them to "com.apple.logic.pro.cs" anyway?" Using Logic pro 8. ???

    Logic froze while I was working on something so I forced quit.  Now every time I open LOGIC a message pops up that says:
    "Error reading/writing file
    “com.apple.logic.pro.cs”:
    Logical end-of-file reached during read operation."
    The only button option is cancel so I press it and another message appears that says:
    "The Preferences are not loaded completely.
    Do not save them, as you would overwrite the Preferences file with incomplete data."
    Then when i close logic a box appears saying:
    "The Preferences are not loaded completely.
    Save them to "com.apple.logic.pro.cs" anyway?"
    There are 3 button options to press; ok, cancel or dont save.
    I press "don’t save" cuz I don't want to ruin anything.
    I found a discussion located here: https://discussions.apple.com/message/9564253#9564253 that says if I delete the file "com.apple.logic.pro.cs" it will resolve the problem.  If I do this will I loose or mess anything up at all, automation, saved channel strips customizations, saved effects, synth, or ultrabeat customizations etc? Or especially will I loose any work I've done?  I have hundreds pieces of music files I've created.  I'm scared to mess anything up with all the hours and months of work I've done.  Is there anyway to fix this without loosing anything?  I'm using Logic Pro 8.
    Thank you

    You can safely delete this file - its the preference file for control surface settings - you haven't said whether you're actually using a control surface or not, if so, you will have to set it up again. A new file will be created when you fire Logic up again, but of course it will contain default settings. If you have a complicated control surface setup, remember to keep a backup copy somewhere in case any future problems arise.
    Other than that, you really have nothing to be scared about - hopefully your problem is as simple as that and there isn't an underlying problem (a corrupt hard drive, for example). You seem concerned about losing work, so I guess you want to think about backing that up on a regular basis too. If you're saving your projects to your system drive, do get an external one for this. And also check that you have plent of free space on your system drive - you need to keep about a quarter or third of it free for your OS and programs to run properly (some temporarily stored files can be quite large).

  • Move to new computer, get "An error occurred while reading files or writing files to disc. The disc

    I tried to move my PE6 install and catalog to a new computer.  It was on a Dell Windows XP machine, and I moved it to a Toshiba Windows 7 (64 bit) machine.  I have always kept my photo files on an external hard drive.  My photo library is 50GB, 10,000 files.  Here is what I did.
    Copied the original PE6 install file to the Toshiba.  Installed but didn’t activate it.
    Copied the entire My Catalog folder to the proper Windows 7 location.
    Plugged the external drive into the Toshiba.  Made sure the same drive letter as before (E).
    Fired up PE6 on Toshiba.  Looked good in Organizer.  Everything seemed to be there, but I didn't try to make changes at that point.
    Deactivated PE6 on the Dell.  Activated on the Toshiba.
    Then I realized that it is not right.  I can edit Keywords and Rating stars on the pics, but not dates, captions or notes.  I get “An error occurred while reading files or writing files to disc. The disc may be full or there may be problems with the source media.”
    Only a fraction of the external drive is in use.
    I can access the files on the external drive with another app (Windows Photo Viewer).
    I tried Reconnect All Missing Files.  Somewhat ambiguously, it says “There are no files to reconnect.”
    In the properties in the Organizer for each picture are the proper file names and paths.  Folder view works fine in Organizer.
    I can put new files in the same external drive directories, import them into PE6, then edit them normally.
    What is the easiest way to get Organizer properly connected to my files?  I suppose I could reimport all the pics on the new machine, but I assume I'd lose some of my metadata.  So that is out of the question.
    Thanks,
    Bill

    Are you sure that file paths are correct? I say this because under XP they would have originally pointed to Documents & Settings/My Pictures whereas on W7 it will be User/Pictures, albeit you are using an external hd.
    Take a look at this knowledge base note on the correct procedure for back-up and restore.
    I think writing metadata to files for such a large catalog will be a thankless task.
    http://helpx.adobe.com/photoshop-elements/kb/backup-restore-move-catalog-photoshop.html

  • Report Subscription - Failure writing file - The network path was not found.

    I have several subscriptins which have been working fine.
    All suddenly stopped with same error - Failure writing file - The network path was not found.
    The subscriptions write to a number of different network paths, all of which exist and are accessible.

    Is this a repeating failure or one time occurrence?  If it's a one time occurrence it could have been a short network outage.  If repeating look and ensure the user that the subscription is using to write the files still has the appropriate permissions,
    is enabled, not locked, etc.  Other things to possibly consider would be flushing the dns cache on the server.  It's possible a firewall rule could have been put in place that would block the ability to access said location as well.  The best
    thing you can do is start by asking "what has changed".

  • Connection refused Error while writing file to FTP server.

    Hi All,
    We got below error while writing file to FTP server. Any one have any idea on this?
    sABCS_1.0_8e88588d4fb54ebd2ac7ef66c8421d52.tmp/writeEncryptedFile.wsdl [ Put_ptt::Put(opaque) ] - Could not invoke operation 'Put' against the 'FTP Adapter' due to:
    ORABPEL-11429
    Error sending file to FTP Server.
    Unable to send file to server. [Caused by: Connection refused]
    Please ensure 1. Specified remote output Dir has write permission 2. Output filename has not exceeded the max chararters allowed by the OS and 3. Remote File System has enough space.

    Hmmm ...
    Same issue as your post from three months' earlier?
    Re: Error while putting file in sftp location.

  • Error Message: An error occurred while reading files or writing files to disc...

    Why am I getting the following error: An error occured while reading files or writing files to disc.  The disc may be full or there may be a problem with the source media.  I am running PSE10 on a iMac using OS X 10.7.3, my Mac has a 1TB hardrive of which about 150GB is used.  I get this error when trying to delete a file out of the Organizer.  The software worked fine until I installed it on my laptop, also a Mac, and tried to share files.

    Hmm. What happens if you disable sharing, just as a test?
    I don't think you can share organizer photos that way, since your versions don't really exist as images, just as a set of directions to organizer for recreate that state of your editing when needed, and you can't run organizer on a network drive, which is pretty much what you're trying to do if you mean you have PSE installed on the other computer and are tryng to use the same catalog for both.

  • An error occurred while reading files or writing files to disc. The disc may be full or there may be

    Does anyone know why I get this error message in PSE9 on a mac computer?
    An error occurred while reading files or writing files to disc. The disc may be full or there may be a problem with the source media.
    I cant put titles on pictures or delete them from the hard drive, etc.
    Please help.
    Thank you!

    Okay. I would suggest going to your username>library>preferences and deleting everything that is anything like com.adobe.Elements Organizer.plist. You will have more than one of these, one with the version number and possibly one with UUID in it. Also delete any lockfiles with the same names. While you're in username>library, also delete any saved application states for the organizer or PSE from your saved states folder. Then repair permissions and try again.
    The username>library folder is hidden in lion. To make it visible, in the Finder click the Go menu and hold down the Option key. It will appear below the little house for your user account.

  • Why is Premiere 6 giving a "Error writing file (disk full?)" message?

    Hello helpful experts,
    I'm using Premiere 6 on a Windows 7 machine.
    I have a file imported in to the timeline and it is set to play in reverse via the speed setting being set to -100 and it plays back in the preview window correctly, in reverse, when I click the play button.
    But when I do a  "File>Export Timeline>Movie" command I get an error message saying "An error occurred while making the movie. Error writing file (disk full?)"... but my hard drive is not nearly full, with over 30 gigs left open on it... and my RAM usage gadget shows over half of my RAM capacity is unused.
    Now previously, weeks ago on a different project, I was getting this same error message for a while when I would hit enter to preview my movie on the timeline (but that worked itself out somehow and eventually stopped giving me that error message).  But when I went to save and export, then I would not get the error message... now, it is just the opposite... I'm now getting the error message when trying to do an export and save the movie.
    And also now when I hit enter to preview, as opposed to just clicking the play button on the preview window, Premiere is going through the process of saving the movie since it is saving a temporary preview file... hopefully, since I'm getting this error message, I can find the temporary preview file and save it as my exported AVI file.
    But I still shouldn't be getting this error message when trying to save, or when trying to preview, as I did for a while a couple of weeks ago.
    Does anyone know about the erroneous error message that says, "An error occurred while making the movie. Error writing file (disk full?)"
    Thanks,
    numetro

    Depending on your hard drive size, P6 may be confused... since drives were not as large when it was written
    For Win7 64bit Pro or Ultimate (or Enterprise?) this is ONE example of using Virtual XP http://forums.adobe.com/thread/702693?tstart=0
    This is saved from an OLD message that may help
    File size limits by disk format type
    Fat = 2 Gig maximum file size
    Fat32 = 4 Gig
    NTFS = ?Terrabytes?
    Message saved from Premiere forum
    John Acocks - 07:52am Apr 17, 2003 Pacific
    I am unable to complete captures because I get a message
    that says "capture stopped because disk was full." What
    does this mean?
    Daniel Conklin - 08:02am Apr 17, 2003 Pacific (#1 of 2)   
    If you are using a Pinnacle card, a possible solution to
    this is to right click on the recycle bin, and set the
    percentage on your media drive to less than 2%.
    There a several other possible causes as well, but you
    need to supply some info about your system. How are you
    capturing and what format is your video? How big is
    your hard drive?
    Jeff Schell - 09:57am Apr 17, 2003 Pacific (#2 of 2)   
    this is one of my favorite error messages. Basically,
    you've chosen an incorrect setting in your DV settings.
    (Odds are you have DV settings). If so, read on:
    1. The DV format is very rigid. Meaning that if you
       make changes to the format, it cannot export as
       requested, because your movie file must match every
       single spec exactly.
    2. When Premiere goes to export a project, the DV codec
       says "Whoa. I can't do anything, because the settings
       don't match."
    3. Then Premiere comes back to you and has to report an
       error. (Don't shoot the messenger). Unfortunately,
       Premiere doesn't know why it wasn't able to export a
       movie. So it says to you, "Um... I can't make the movie.
       Um... maybe your hard drives are full?"
    It's a complete guess. And has nothing to do with your harddrives.
    Check your project settings and/or your export settings. Make
    sure you have chosen one of the "presets" that will specify
    every correct setting for you. Make sure it is one of the DV
    presets, if you are using DV video, or make sure it is one of
    the presets supplied by your capture card manufacturer (in this
    case I'm going to guess Pinnacle or Matrox.)
    To choose a preset, go to Project > Settings Viewer, and then
    click on the project settings column, and then click 'load' to
    load a correct preset. Do the same with export settings.

  • Failure Writing file...Report processing has been canceled by user

    I'm having a bit of an odd issue.  In my SCOM environment I have 8 scheduled reports that management likes to look at. 7 of them are working just fine, however one of them keeps failing with the status:
    "Failure writing file <file name> : Report processing has been canceled by the user."
    Now this report is running every Sunday at 2:30 AM and I can assure you I am not up administering reports at 2:30 am on a Sunday.
    Except for the file name this is set up identically to one of the reports that is working fine. If I write click and "run" the report it generates, though it takes a few minutes, and I can save it as an excel file to where we want it. There's nothing
    in the event log around the time it says it last ran (2:30:03 AM).
    Any ideas?

    Hi Dave,
    Could be conflicting with this built maintenance at 2:30am:
    There is a rule in the System Center Internal Library called "Optimize Indexes". This rule runs every night at 2:30am on the RMS and calls p_OptimizeIndexes.  Make sure any standard maintenance you perform on the OpsMgr DB does not interfere
    with this job. 
    http://blogs.technet.com/b/kevinholman/archive/2008/04/12/what-sql-maintenance-should-i-perform-on-my-opsmgr-databases.aspx
    Did you look at SQL Reporting Services Logs?
    As well, you can try to change the Report Execution TimeOut in Report Manager.
    Natalya

  • Writing files is not supported on this device (smart camera 1722)

    Hi,
    I have a smart camera NI 1722 and I want to save images that I aquire. I use the "IMAQ Write file 2.vi" and I always get this error: "Writing files is not supported on this device". 
    Is the smartcam really doesn't support to write images in a folder? I've tried to change the path (on the smartcam and on our server) but I always get the same error.
    I use LabVIEW Real-Time 8.5.1, LabVIEW 8.5.1, NI Vision 8.5 etc (all the lastest versions of LabVIEW).
    Thank you for helping me,
    Stephanie

    Hello
    If you already flattened the image, you can now save it on the hard disk of the smart camera.  To load the image, you will have to un-flatten with an image again.  See the attached document to see the block diagrams.
    I did it for a template in a pattern matching program and worked!!!
    Good Luck
    Santiago Orellana V.
    HighLights - National Instruments Ecuador
    Attachments:
    Grabacion y recuperacion de imagenes en smart camera.doc ‏28 KB

  • Director 12- can't create a windows projector - problem writing file error

    I am trying to create a windows projector of a project. when I get the following error - problem writing file - file name- Can't compress file that has been modified and not saved. The file has not been modified and has been saved. Any help would be great.

    Hi.
    You say you have tried publishing to a new empty folder.  From the video I can see that the folder has table1.app in there (25 secs in) which is a Mac projector that has been published.
    Yet you have Windows Projector checkbox ticked at the start of the video.
    I publish Mac and Windows projectors to entirely seperate folders as a matter of practice.
    I call the folders "Published" and "PublishedMac" and that is where the respective projectors for each piece of software lives.
    Perhaps there is some mix up between Mac and Windows publishing that is going on because
    you are publishing both to the same folder?
    Hope this helps.
    Richie

Maybe you are looking for

  • What is CAFR in BW and how are they  helpful???

    hi,    Can you please tell me something about CAFR and helpful docs are appreciated. Regards, Andy

  • How to avoid shut down BPELPM Server when creating a user?

    Hi, How to avoid shut down BPELPM Server when creating a JAZN user and after doing changes to user-properties.xml? Thanks, Jorge

  • Transfer digital camera videos to ipod

    how can i transfer my digital camera video to the ipod? i can transfer the pictures, but the digital video says it does not support, what can i do?

  • I18n(Multilingual) Implementation in WebCenter Sites

    Hi Can anybody tell me how to implement Multilingual support in Web Center Sites? In development guide it has been written that we have to create a separate template for each language by setting different language locale. Is there is any different wa

  • What is the Source System

    Hi guys   I am working with SD and MM reporting. My director told me that we (BI guys) need to help other folks they want to use the BI reporting (now they are using another instance of SAP) ,..What does it mean ? Does it mean that kind of Source sys