Oops. Can I read my byte stream files with missing headers?

My fault, I know, but I wrote out an 1D array of numbers to a file using the simple Write File vi, not realising that a header would have been a good idea at the time. Now I can't read them back in because LabVIEW doesn't know what they are, and trying to put the original array element (Dbl Precision Number) on the Byte Stream Type of Read File doesn't work.
So, is there any way that I can insert an appropriate header back into the beginning of the file so that I can then read them in successfully?
(No, unfortunately I can't regenerate the data. Believe me, I would if I could!)
Thanks,
Riggy

I suppose you used the Write File function from the File I/O pallette since there is no Write File VI?
If that is the case your file should be exactly 8*N bytes long, if the array had N elements of type DBL.
You can simply read back you data with the 'Read characters from File' VI (from the File I/O pallette) and then typecast the read string to a 1D array of DBL. (typecast is the first icon in the 'Advanced--Data Manipulation' pallette.
-Franz

Similar Messages

  • Can't read PageMaker 6.5 files with InDesign CS3

    I have a lot of old PageMaker 6.5 files that need to be upgraded to InDesign.
    When I try to open them in InDesign CS3, I get an error that says:
    Cannot open the file "XYZ". Adobe InDesign may not support the file format, a plug-in that supports the file format may be missing, or the file may be open in another application.
    I get this error on a Mac Pro G5 (PowerPC), running OS X 10.5.8.
    What's interesting is that when I try to open the same files on other computers on the network, it works just fine.  The other machines are all Intel Macs, running OS X 10.6.8 or greater.  The files are on a Mac Server.
    Can this problem be fixed on the Mac G5, maybe by installing a plugin, or is there no hope?
    Thanks!

    Interesting thought, but I suspect the file is actually a training manual and that's the real name of the file, with no extension at all. Pagemaker 6.5 files would have had a .p65 extension, I believe.

  • Still can't read Nikon D60 NEF Files with Camera RAW 4.4 updatel

    I've installed the Camera RAW 4.4 update with Elements 5.0.2, but I'm still unable to import files from the camera. Elements advises that files are damaged ...

    My problem was that while I had renamed the old file by changing the suffix to ".old", this was not enough. I subsequently created a new sub-folder "old" and moved the old file to this new location. I had already copied the new file to the correct location. Once the old file was gone from the active folder, all was OK.

  • How can we read some bytes from every line of the file

    How can we read some bytes from the every line of the file moving on to the next line
    without using the read line

    Actualiy readLine() takes more execution time
    for reading a part of line if we can do so without
    readLine() we can save some time...Well, if you knew, beforehand, the length of each line, you could use RandomAccessFile and its seek method, but, since you don't, you would have to read the rest of the line character-by-character, checking to see if it is a newline, in order to place the "cursor" at the beginning of the next line in order to read the next few characters you want.
    So, as you can see, you will need to read the entire line anyway (and if you do it yourself you also have to do the checking yourself considering all three possible end-of-line sequences), so you just as well use readLine().
    Some people may suggest Scanner and it's nextLine() method, but that also needs to read the rest of line (as evidenced by the fact that it returns it), so that is no different than the readLine() (or read it yourself) solution.

  • Windows Easy Transfer (WET) Issues with External Hard Drive - "Can't read from the source file or disk"

    I work for Office Depot, in the tech department. Basically, one of our associates was supposed to do a data backup, and re-install Windows 7, then transfer the files back. He used Windows Easy Transfer and compacted everything into a 163 GB file. 
    Now comes the hard part. When we try to put it back on his computer ((drag-and-drop to the desktop) which has been wiped back to factory settings using the recovery partition), it stops at 79.5 GB remaining (you know how it doesn't give you a % of completion,
    it just shows how many GB are remaining) and then says "Can't read from the source file or disk" and gives you an option to try again, or cancel. It gets hung up on the same point each time.
    Normally, this wouldn't be a huge issue, but the contents on the drive are his wife's architect blueprints and interior design stuff, along with wedding photos, etc, which are the only copies they have. On top of those, they have court documents and other
    important files that we are unable to access now.
    I wasn't involved with this transfer, so I'm trying to clean up the mess as best I can. I remembered that the customer's wife was Russian, and had some files typed with a Russian keyboard, so on and so forth. I wonder if that's the issue? If not, I really
    have no idea how to manually extract things from a ".mig" file, or how to diagnose what area is potentially corrupted.
    In light of this situation, we tried using "Recuva" to recover the files post-wipe, but everything was corrupted or unable to be opened, and it also extracted and recovered all of the "useless" photos, such as the skype logos, up and
    down arrows for browsers, etc (it was 160,000+ photos).
    Trying to avoid a potential lawsuit, unhappy customer, and costing the company lots of money to see if professionals can get into this external hard drive.
    Other relevant information:
    We used a Toshiba 500 GB (465 GB) external hard drive.
    Customer's computer is an HP Pavilion P6000 Series (Model No. p6520y) running Windows 7 Home Premium 64-bit Service Pack 1.
    Any other information that is needed can be provided, thanks in advance, and hopefully we can find a solution to this issue quickly!
    -John

    I think there's a lack of understanding somewhere.
    "If you even can't start the process, please unplug it from your new PC. Then head back to your new computer and plug
    the external drive back in to your new computer. "
    Unplug from new, head back to new, plug it back in? That doesn't make much sense! Haha.
    I knew what you meant though, somewhat. When I search through the drives after clicking yes (Has windows easy transfer
    already saved your files blah blah blah) I click on the transfer file and it says "Windows Easy Transfer could not open the file".
    Rather than drag-and-drop the file to the desktop, I now tried to double-click on the file itself while it was plugged
    into the computer. It opened, and it started transferring until it was about 70% completed, and then an error popped up saying "WET can't open the easy transfer file, make sure your USB device is plugged in or check your internet connection". 
    I checked, and the USB hard drive's light wasn't on. Now, I unplug it and plug it back in, and the light comes back on,
    so I click Retry, and it resets the bar back to nothing and says "Transfer time: 1 minute".
    Rather than continue trying, I clicked "Cancel" instead of Retry, and it says "Your transfer did not complete successfully."
    It says to click "view report" for more information, but there's no "view report button".
    At the moment, I am scanning the External Drive for bad sectors using the check disk tool in properties. It's frozen
    at "0 USN bytes processed".

  • I can't read a Object from file, Please help me

    i want to write a Object into File. this is code of Object
    class objStoreCus implements Comparable, Serializable
    String customerID = new String();
    String customerName = new String();
    String customerEmail = new String();
    objStoreCus(String cusID, String cusName, String cusEmail)
    customerID = cusID;
    customerName = cusName;
    customerEmail = cusEmail;
    objStoreCus(){}
    public int compareTo(Object o)
    objStoreCus oS = new objStoreCus();
    oS = (objStoreCus)o;
    return(customerEmail.compareTo(oS.customerEmail));
    private void writeObject(ObjectOutputStream s) throws IOException {
    s.defaultWriteObject();
    private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
    try
    s.defaultReadObject();
    }catch(IOException ie){throw new IOException();}
    catch(ClassNotFoundException cnt){throw new ClassNotFoundException();}
    And I was wrote above Object into File by this code :+
    FileOutputStream fos;
    ObjectOutputStream oos;
    FileInputStream fis;
    ObjectInputStream ois;
    public void writeObjToFile(objStoreCus obj)
    try
    fos = new FileOutputStream("Exrcise3.ex3", true);
    }catch(FileNotFoundException fnfe){}
    try
    oos = new ObjectOutputStream(fos);
    //ghi doi tuong vao file
    oos.writeObject(obj);
    //dong stream
    oos.close();
    fos.close();
    }catch(IOException ie){}
    But i can't read above Object from file. allway have a Exception occur "StreamCorruptedException".
    this is code read Object form file :
    *parameter is ArrayList will be store Object from file.
    public void readObjFromFile(ArrayList al)
    try
    fis = new FileInputStream("Exrcise3.ex3");
    }catch(FileNotFoundException fnfe){}
    try
    ois = new ObjectInputStream(fis);
    while(true)
    try
    objStoreCus osc = new objStoreCus();
    osc = (objStoreCus)ois.readObject();
    System.out.println(osc.customerEmail);
    }catch(Exception e)
    e.printStackTrace();
    //System.out.println();
    break;
    ois.close();
    fis.close();
    }catch(IOException ie){}
    }

    Problem lies in
    os = new FileOutputStream("Exrcise3.ex3", true);
    You are trying to append to that file, You should always use new file to serialize objects.
    os = new FileOutputStream("Exrcise3.ex3");
    Try with above line.

  • HT204022 I can not delete the photo stream file why?

    I can not delete my photo stream file why? How do I do this?

    What happens when you try?

  • 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.)

  • How can I read the printer snapshot file printers.xml

    How can I read the printer snapshot file printers.xml

    XML files are typically viewed using a web browser.
    Open the XML file and the default program should open it automatically.  If you are prompted to select a program, use the option that lets you choose a program and brows through the directories for your browser (for example, use Internet Explorer, Firefox, etc.).
    If need be, you should be able to right-click the file and select open with to choose the program to open it with.
    There are other XML viewers out ther, but web browsers are typically the default as XML is a web language.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • Bought a new camera and Photoshop advises me that it can not read my type of file.. Its canon 7d mark 2 and the extension is CR2.

    Bought a new camera and Photoshop advises me that it can not read my type of file.. Its canon 7d mark 2 and the extension is CR2.

    Hi EddieGerdak,
    The update is available now.
    Release details:
    Lightroom 5.7: http://blogs.adobe.com/lightroomjournal/2014/11/lightroom-5-7-now-available.html
    Camera Raw 5.7: http://blogs.adobe.com/lightroomjournal/2014/11/camera-raw-8-7-and-dng-converter-8-7-now-a vailable.html
    Regards,
    Pete

  • Can't read txt or pdf files?

    I've been unsuccessfully trying to view these two most popular text files on my iPod touch. I thought that considering the size of the screen as well as ebook capability, formats like pdf and txt would surely be supported. Is it just me? Maybe I can't find the right option in the itunes or ipod itself, but itunes says ipod can't read this kind of file, while ipod's safari says it can't read the file when I try to download a .txt via Wi-Fi. What am I doing wrong? Do I need some additional software for this?

    I answered too soon!
    I didn't read your question fully.
    Your question should be: How do I get pdf and text files onto my iPod touch to read. I've tried iTunes and it does not work.
    The answer I gave is correct and will solve your problem.
    - email it to yourself and read i Mail (not the best solution).
    - Download the free version of EverNote from the App store and download the version for your computer, Drag the txt or pdf into a new note in EverNote on your desktop and sync to the cloud (as they say) and open the EverNote app on your iPod and sync
    - Do the same with SugarSync or DropBox (you need desktop and iPod versions of both, both free)
    - text files can be put in memos in Outlook and synced with Notes on your iPod
    There are other apps -- Phoneview, for example -- that will also help.
    I'd use... wait. I DO use .. EverNote
    -fred

  • How can I Read/write a ascii file?

    How can I Read/write a ascii file? like this:
    101     0.0000     -1.0000 +
    102     -0.1887     -0.9485 +
    103     -0.3578     -0.8639 +
    104     -0.5022     -0.7516 +
    105     -0.6177     -0.6177 +
    106     -0.7018     -0.4689 +
    107     -0.7533     -0.3120 +
    108     -0.7723     -0.1536 +
    109     -0.7603     -0.0000 +
    110     -0.7198     0.1432 +
    111     -0.6543     0.2710 +
    112     -0.5682     0.3796 +
    113     -0.4660     0.4660 +
    114     -0.3531     0.5284 +
    115     -0.2345     0.5660 +
    116     -0.1152     0.5791 +
    117     -0.0000     0.5689 +
    118     0.1069     0.5375 +
    119     0.2020     0.4876 +
    120     0.2823     0.4224 +
    121     0.3457     0.3457 +
    122     0.3911     0.2614 +
    123     0.4180     0.1732 +

    import java.util.*;
    import java.io.*;
    class BallB{
         public static void main (String args [])
         throws Exception {
              String str=" ";
              String myString="";
              try {
                FileReader fr = new FileReader("test.txt");
                BufferedReader br = new BufferedReader(fr);
                   FileWriter fw = new FileWriter("test1.txt");
                   while(str!=null){
                        myString = str+"\n";
                        str = br.readLine();
                        fw.write(myString);
                   br.close();
                   fw.close();
              }catch (Exception e) {
                   e.printStackTrace();
    }

  • How to read appended objects from file with ObjectInputStream?

    Hi to everyone. I'm new to Java so my question may look really stupid to most of you but I couldn't fined a solution by myself... I wanted to make an application, something like address book that is storing information about different people. So I decided to make a class that will hold the information for each person (for example: nickname, name, e-mail, web address and so on), then using the ObjectOutputStream the information will be save to a file. If I want to add a new record for a new person I'll simply append it to the already existing file. So far so good but soon I discovered that I can not read the appended objects using ObjectInputStream.
    What I mean is that if I create new file and then in one session save several objects to it using ObjectOutputStream they all will be read with no problem by ObjectInputStream. But after that if in a new session I append new objects they won't be read. The ObjectInputStream will read the objects from the first session after that IOException will be generated and the reading will stop just before the appended objects from the second session.
    The following is just a simple test it's not actual code from the program I was talking about. Instead of objects containing different kind of information I'm using only strings here. To use the program use as arguments in the console "w" to create new file followed by the file name and the strings you want save to the file (as objects). Example: "+w TestFile.obj Thats Just A Test+". Then to read it use "r" (for reading), followed by the file name. Example "+r TestFile.obj+". As a result you'll see that all the strings that are saved in the file can be successfully read back. Then do the same: "+w TestFile.obj Thats Second Test+" and then read again "+r TestFile.obj+". What will happen is that the strings only from the first sessions will be read and the ones from the second session will not.
    I am sorry for making this that long but I couldn't explain it more simple. If someone can give me a solution I'll be happy to hear it! ^.^ I'll also be glad if someone propose different approach of the problem! Here is the code:
    import java.io.*;
    class Fio
         public static void main(String[] args)
              try
                   if (args[0].equals("w"))
                        FileOutputStream fos = new FileOutputStream(args[1], true);
                        ObjectOutputStream oos = new ObjectOutputStream(fos);
                        for (int i = 2; i < args.length ; i++)
                             oos.writeObject(args);
                        fos.close();
                   else if (args[0].equals("r"))
                        FileInputStream fis = new FileInputStream(args[1]);
                        ObjectInputStream ois = new ObjectInputStream(fis);
                        for (int i = 0; i < fis.available(); i++)
                             System.out.println((String)ois.readObject());
                        fis.close();
                   else
                        System.out.println("Wrong args!");
              catch (IndexOutOfBoundsException exc)
                   System.out.println("You must use \"w\" or \"r\" followed by the file name as args!");
              catch (IOException exc)
                   System.out.println("I/O exception appeard!");
              catch (ClassNotFoundException exc)
                   System.out.println("Can not find the needed class");

    How to read appended objects from file with ObjectInputStream? The short answer is you can't.
    The long answer is you can if you put some work into it. The general outline would be to create a file with a format that will allow the storage of multiple streams within it. If you use a RandomAccessFile, you can create a header containing the length. If you use streams, you'll have to use a block protocol. The reason for this is that I don't think ObjectInputStream is guaranteed to read the same number of bytes ObjectOutputStream writes to it (e.g., it could skip ending padding or such).
    Next, you'll need to create an object that can return more InputStream objects, one per stream written to the file.
    Not trivial, but that's how you'd do it.

  • Can't import RAW and psd file with same name different extension

    Trying to import a folder of images from desktop that I have been working with in Bridge CS3.
    LR won't import a RAW file that has a PSD file by the same name. Tried renaming the PSD and deleting the one with the same name, but says it is still there and won't import the RAW file - What is the correct workaround on this? Why can't it import same name files with different extensions?

    A forum search for 'RAW + JPEG' will give you more posts on this than you care to read. This will change. For now, import the RAW and PSD's from separate folders and then move them together for within LR.
    LR is seeing the RAW as a sidecar to the PSD. It is an unforseen effect of the RAW + JPEG thing where they decided to not import the JPEG, seeing it as basically a preview image for the RAW.
    LOL
    Don
    Don Ricklin, MacBook 1.83Ghz Duo 2 Core running 10.4.9 & Win XP, Pentax *ist D
    http://donricklin.blogspot.com/

  • I cannot read Nikon D600 raw files with CS5

    I cannot read Nikon D600 raw files with CS5, I have tried Camera Raw 6.1 update but that has not worked.

    Nikon D 600 will work with ACR 7.3 which needs minimum of PS CS 6  : http://helpx.adobe.com/creative-suite/kb/camera-raw-plug-supported-cameras.html
    With PS CS 5, ACR 7.3 will not work.
    So either you need to upgrade to CS 6 or use DNG converter to convert images to DNG format which you can open in CS 5

Maybe you are looking for

  • Can't make Phone calls with Yosemite and iOS 8.1.1

    I purchased two brand new Apple products: MacBook Pro with Retina display, and the new iPhone 6. I would love to use this new feature of making phone calls with my macbook but cannot seem to make it work. It keeps saying "iPhone and macbook has to be

  • Read only af:inputText being rendered as "span" instead of read only input

    I am using JDeveloper 11.1.1.6.0 I have noticed that when using components such as "af:inputText" and "af:inputDate" with the "readOnly" attribute set to true, the resulting render is a label as a "<span>" element as opposed to a read only <input> el

  • Changed Airport Express names, not showing correctly in iTunes

    I needed to swap the location of two Airport Express units, and I renamed them accordingly. They show up properly within Airport Utility/OS X, but within iTunes they seem to be cached to their old names. How do I reset them, flush the cache, or simpl

  • Allow copy and paste from word to my school program

    When I create a word document and attempt to copy and paste it into my college discussion board, it states that Mozilla does not allow me to do so and to contact firefox to release the restrictions.

  • 160Gb iPod Classic - Coverflow Sort order

    I have posted a similar forum topic on iLounge and I am really surprised at the lack of response and given that this issue may/must affect the iPhone and Touch that more people are not discussing it. My problem is this, I have purchased a 160Gb Class