Need helpwith UTF8 files

i have a problem hope to get help with it
i got a file written in UTF8 encoding so i'm using this code to open it
FileInputStream fis = new FileInputStream("test.txt");
InputStreamReader isr = new InputStreamReader(fis, "UTF8");
my problem after that is i want to read int,float,double... etc
from this file but this class InputStreamReader does not provide except read() --> which reads one char and convert into int
read(char[],offset,length) --> which reads anumber of chars and return them into the chararray(first parameter)
but i need to read int(4 bytes) and then convert it as one unit into it's corresponding char
if i use this code
char[] c=new char[4];
m_File.read(c,0,4);
it divides the ASCII code into 4 char , which is not the right representation of the code
so any suggestions ?

for the format of the file, i have a full spedification of it
it contains both letters and numbers, it contains for example:
1) signature (represented in 8 bytes)
2) a title (of variable size of chars each character is written in the file in 4 bytes)
so if the tiltle is OUTSURF
u would have 'O' in 4 bytes, 'U' in 4 bytes and so on.. and u can know the title is finished when u read an integer and it equals zero
there r other data specified in the format (i cannot list them all) but some of them is double (8 bytes)representes a number, or float(4 bytes) .. etc
i have the code which reads this file format but in C# and i'm trying to convert it into java, this is a function below which reads the first part of the file which contains (signature as string, byteorder as an int, title as a string, then numberOfVariables as an int, then the Variables each as a string)
public bool GetFileHeader()
               signature=m_File.ReadBytes(8);
               if(signature[5]!='7' || signature[6]!='1')
                    m_ErrorMessage="Invaid file format- Check the version number";
                    return false;
               byteOrder=m_File.ReadInt32(); // reads 4 bytes
// as one int
               title=ReadString();
               num_variables=m_File.ReadInt32();
               varnames=new string[num_variables];
               for(int i=0;i<num_variables;i++)
                    varnames=ReadString();
               return true;
private string ReadString()
               int val=m_File.ReadInt32();
               string m_string="";
               while(val!=0)
                    m_string+=((char)val);
                    val=m_File.ReadInt32();
               return m_string;

Similar Messages

  • Opening a UTF8 file in SqlPlus Worksheet

    OS: Win2000 server
    Oracle 9: Unicode installation, for multilingual data.
    I need to open a script (it's in UTF8) file containing some Japanese characters. I changed the client configuration (NLS_LANG) and also my regional settings to be able to type Japanese characters; but when I open the file it's corrupted.
    If I do a copy and paste from Notepad to the SqlPlus Worksheet or if I type the Japanese characters everything works.
    Any ideas of what I'm doing wrong?

    Your NLS_LANG should reflect the regional setting you have for your Windows 2000 client. SQL*PLUS is not going to be able to handle Unicode files on a Windows 2000 environment. You could use iSQL*PLUS for this purpose. It is a browser based version and can handle UTF-8.

  • I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?

    I am running out of memory on my hard drive and need to delete files. How can I see all the files/applications on my hard drive so I can see what is taking up a lot of room?
    Thanks!
    David

    Either of these should help.
    http://grandperspectiv.sourceforge.net/
    http://www.whatsizemac.com/
    Or search 'disk size' in the App Store.
    Be carefull with what you delete & have a backup BEFORE you start, you may also want to reboot to try to free any memory that may have been written to disk.

  • What is the exact name of the cable I need to connect my old hard drive from my macbook pro (it has been taken out of the computer) to my new macbook pro?  I need to transfer files from the old hard drive to the new computer.

    What is the exact name of the cable I need to connect my old hard drive from my macbook pro, which has been removed from the computer, to my new macbook pro?  I need to transfere files from the old hard drive to the new computer.

    No eSATA to USB. Just a SATA/IDE to USB adapter. Google SATA/IDE to USB adapter and you will get tons of links to buy them. Most likely your local computer electronics store has them, although they might be more expensive buying locally than online.
    I have several. You can get either USB 2, which what I recommend, or USB 3. USB is backward compatible so a USB 3 adapter will work on a USB 2 port and a USB 2 adapter will work on a USB 3 port. Backward compatible in both directions.
    I suggest a USB 2 type because there have been some problems with certain USB 3 devices, the USB 3 interface used isn't all that good in those certain devices. USB 3 is still fairly new where as USB 2 has been around for over 10 years.
    synghem wrote:
    Thank you LowLuster,
    At the apple store they said I needed an esata to usb wire.  But looking at wires on line has been confusing.  Is sata the same as esata?  How do I know if I need a usb 3 or usb 2?

  • HT204266 I erase all application of my iphone 4 with erase restore and now it's in restore mode. Now is there any way to restore my iphone without backup. Please help me. I have no need my previous file i just want my i phone ok and work smoothly as new p

    Hi,
    I erase all application of my iphone 4 with erase restore without any backup & i also lose the product serial number. Now it's in restore mode. Now is there any way to restore my iphone without backup. Please help me. I have no need my previous file I just want my iphone4 ok and work smoothly as like new ipone justlike i bought it at first time. I can't restore it. So Please help me to solv this proble.

    See Here  > without the Backup  >  http://support.apple.com/kb/HT4137

  • Multibyte character error in SqlLoader when utf8 file with chars like €Ää

    hello,
    posting from Germany, special charactes like german umlaute and euro sign in UTF8 Textfile, SqlLoader rejecting row with Multibyte character error
    Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
    Database Characterset: WE8MSWIN1252
    OS: SLES 11 x86_64
    Testcase SqlDeveloper:
    CREATE TABLE utf8file_to_we8mswin1252 (
    ID NUMBER,
    text VARCHAR2(40 CHAR)
    can't enter euro symbol in this posting, end's in '€' (?)
    SELECT ascii(euro symbol) FROM dual;
    128
    SELECT chr(128) from dual;
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (1, '0987654321098765432109876543210987654321');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (2, 'äüöäüöäüöäÄÖÜÄÖÜÄÖÜÄßßßßßßßßß߀€€€€€€€€€');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (3, 'äüöäüöäüöäÄÖÜÄÖÜÄÖÜÄäüöäüöäüöäÄÖÜÄÖÜÄÖÜÄ');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (4, 'ۧۧۧۧۧۧۧۧۧۧ1');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (5, 'äüöäüöäüöäÄÖÜÄÖÜÄÖÜÄäüöäüöäüöä');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (6, 'ßßßßßßßßß߀€€€€€€€€€1');
    INSERT INTO utf8file_to_we8mswin1252 (ID, text) VALUES (7, 'ßßßßßßßßß߀€€€€€€€€€äüöäüöäüöäÄÖÜÄÖÜÄÖÜÄ');
    commit;
    Select shows correct result, no character is wrong or missing!!!!
    put this in a UTF8 file without delimiter and enclosure like
    10987654321098765432109876543210987654321
    the SqlLoader controlfile:
    LOAD DATA characterset UTF8
    TRUNCATE                              
    INTO TABLE utf8file_to_we8mswin1252
    ID CHAR(1)     
    , TEXT CHAR(40)
    on a linux client machine, NOT the Oracle-Server
    export NLS_LANG=AMERICAN_AMERICA.WE8MSWIN1252
    sqlldr user/pwd@connectstring CONTROL=TEST01.ctl DATA=TEST01.dat LOG=TEST01.log
    Record 6: Rejected - Error on table UTF8FILE_TO_WE8MSWIN1252, column TEXT.
    Multibyte character error.
    Record 7: Rejected - Error on table UTF8FILE_TO_WE8MSWIN1252, column TEXT.
    Multibyte character error.
    Select shows missing characters in row 4 and 5, SqlLoader loads only the first 20 characters (maybe at random)
    and as shown above, row 6 and 7 never loaded
    Problem:
    can't load UTF8 Flatfiles with SqlLoader when german umlaute and special characters like euro symbol included.
    Any hint or help would be appreciated
    Regards
    Michael

    ## put this in a UTF8 file without delimiter and enclosure like
    The basic question is how you put the characters into the file. Most probably, you produced a WE8MSWIN1252 file and not an UTF8 file. To confirm, a look at the binary codes in the file would be necessary. Use a hex-mode-capable editor. If the file is WE8MSWIN1252, and not UTF8, then the SQL*Loader control file should be:
    LOAD DATA characterset WE8MSWIN1252
    TRUNCATE
    INTO TABLE utf8file_to_we8mswin1252
    ID CHAR(1)
    , TEXT CHAR(40)
    )-- Sergiusz

  • Help needed in splitting files using BPM

    Hello experts,
    I am working on an interface where i need to split files within BPM.
    I know,i can achieve it in Message Mapping by mapping Recordset to Target structure and then using Interface Mapping within Transformation step.But i dont want to follow this.Is there an alternative way to achieve this within BPM.
    I have an input file with multiple headers and i need to split for each header.My input file looks like this:
    HXXXXXABCDVN01
    MXXXXXXXXXXXXXX
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    HXXXXXABCDVN02
    MXXXXXXXXXXXXXX
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    HXXXXXABCDVN03
    MXXXXXXXXXXXXXX
    SXXXXXXXXXXXXXX
    Is there a way, where i can specify this condition within BPM , that split files for every H.
    Thanks in advance.
    Regards,
    Swathi

    Hi,
    have your target structure with occurence as 0...unbounded in the mapping and map the header filed to the root node (repeating parent node) of the target structure....this will create as many target messages as the header fileds....if you want to send these messages separately then use a block in BPM with ForEach option....
    Splitting and Dynamic configuration can be applied in the same mapping.
    Regards,
    Abhishek.
    Edited by: abhishek salvi on Dec 18, 2008 12:59 PM

  • I need to upload file from my computer to website, when I click browse to look at which documents I want it does nothing.

    I need to upload file to quicken loans I click the blue button that says Browser on it so I can search what documents to upload it doesn't open the folders to look for the documents to select.

    Hi there. you have '''search.conduit''' set up as your '''about:newtab''' page.
    This could be add-ware. Is this what you want?
    '''[https://addons.mozilla.org/en-US/firefox/addon/searchreset/ Mozilla Search Reset]''' {web link}
    This add-on is very simple: on installation, it backs up
    and then resets your search preferences and home page
    to their default values, and then uninstalls itself. This
    affects the search bar, URL bar searches, and the home
    page.

  • What is the need of the file Adobe\Acrobat\8.0\Collab\Workflows?

    Hi
    I am using Adobe PDF Annotation Service with Documentum.
    I am facing a performance issue with the Annoration Service.
    The size of the C:\Documents and Settings\<username>\Application Data\Adobe\Acrobat\8.0\Collab\Workflows is increasing by 14 KB whenever I use the service to Annotate PDF Documents.THis happens at all my client machines.
    What is the need of this file in the context?
    Can we do something to restrict the inflation of this particular file?
    Can anybody help me to understand the process behind this?
    Thanks,
    Sleeba

    Hi
    I am using Adobe PDF Annotation Service with Documentum.
    I am facing a performance issue with the Annoration Service.
    The size of the C:\Documents and Settings\<username>\Application Data\Adobe\Acrobat\8.0\Collab\Workflows is increasing by 14 KB whenever I use the service to Annotate PDF Documents.THis happens at all my client machines.
    What is the need of this file in the context?
    Can we do something to restrict the inflation of this particular file?
    Can anybody help me to understand the process behind this?
    Thanks,
    Sleeba

  • I am setting up a new iMac and need help syncing files to Dropbox.  On my old computer I had it set where when I saved a document, it was saved on my hard drive, as well as to a folder in Dropbox.  I can't remember how I set this up.  Any help?

    I am setting up a new iMac and need help syncing files to Dropbox.  On my old computer I had it set where when I saved a document, it was saved on my hard drive, as well as to a folder in Dropbox.  I can't remember how I set this up.  Any help?

    The way that Dropbox works is that it keeps a copy of all your files in your local Dropbox folder on your hard drive (which is, by default, directly under your home folder). Adding files to that folder will sync them to the Dropbox server.
    You do of course have to download the Dropbox application to enable this (download link at the top right of http://dropbox.com ).
    Matt

  • What plug-in do I need to import file from scanner to make a batch job

    what plug-in do I need to import file from scanner to make a batch job

    Hi Atul,
    I`m having PS Elements Ver.13 and scanner Epson V500 Photo.
    Nice if your can help me.
    Sten

  • What software do I need to view files or watch movies on my imac/time capsule, from my macbook (away from home)?

    What software do I need to view files or watch movies on my imac/time capsule, from my macbook (away from home)?
    imac is running lion...macbook is couple years old.
    thnx

    It appears you have a iPad Mini and a MacBook. Assuming that, this
    About renting movies from the iTunes Store - Apple Support
    says
    If you rented the movie on your iOS device or Apple TV, you can’t move it to any other device.
    This is the Mac Mini desktop forum

  • What cable do I need to transfer files to my 2013 iMac from my 2009 iMac?

    what cable do I need to transfer files to my 2013 iMac from my 2009 iMac?
    Thanks in advance,
    Braden

    There aren't any ports in common between both Macs except the USB, that can't be used to connect both Macs. The easiest solution is to connect both Macs with a FireWire 800 cable and get the Thunderbolt to FireWire adapter, which you will have to connect into one of the Thunderbolt ports of the 2013 iMac.
    Then, to transfer files to the 2013 iMac, you have to put the 2009 iMac in Target Disk Mode, so start it holding the T key, and you will see the FireWire icon on the screen. Now, the 2013 iMac is detecting the hard disk of the 2009 iMac as an external disk, so open a Finder window and select it, under "Devices", and you will be able to transfer the data you want to your 2013 iMac.
    If you have to transfer applications and settings, too, I recommend you to use Migration Assistant with both Macs connected with the FireWire cable, too > http://support.apple.com/kb/HT4889

  • I need to retrieve files from my iPad but I forgot my password. I tried to restore it but then it said I had to turn off Find my iPad on my iPad. I can't do this because I can't get into it. What do I do?

    I need to retrieve files from my iPad but I forgot my password. I tried to restore it but then it said I had to turn off Find my iPad on my iPad. I can't do this because I can't get into it. What do I do?

    If the iPad was running iOS 7,  iCloud: Find My iPhone Activation Lock in iOS 7
    http://support.apple.com/kb/HT5818
    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • Hi, WWhen I turn on my mac pc, enter my account password my page wont load up , I can access the internet through my families account but not mine. There is a message telling me I need to delete files but the page won't load anything. Any help appreciated

    Hi
    When I turn on my pc and log into my account there is a message telling me I need to delete files. But the page won't load up anything to allow mw to do this. I am concerned I may have lost all my personal info.
    I can log into other family members accounts but not mine.
    Any help appreciated
    Thanks

    You only have to clone your mac when using certain cable modem.  You don't clone your mac when using dsl.
    Greetings from Northern Ontario, Canada

Maybe you are looking for

  • How to Align Text in the TextArea

    How to Align text in the TextArea. My purpose is that I want to post the records after retrieving from database. All the records in each fields should keep aligned like Oracle WorkSheet. I want this way Code Name Place City a01 nilopher swiss street

  • Some questions on the Sleek

    Hey there. I have some questions regarding the Zen Sleek, since I may get one to replace my Zen Xtra. First of all, how much does it cost to have the battery replaced? I've heard/read that you cannot do it yourself (which irks me to know end), but I

  • Cannot activate my iphone after updating

    after updating ios5.01, my Iphone 3GS needs to be activated. While i was activating it, it keeps come back saying" your iphone can not be activated because the activation server is temporarily unavaliable"  I've been trying all night, and the problem

  • How do I change my name that's seen by everyone?

    Hello - I see that my name is listed, and want to change it. When going into 'My Public Profile' it says my name under 'Alias', but there doesn't appear to be any way to change that. Then, it also says that my is hidden, which is not. How can I give

  • Editable template regions

    I made a div with a editable region and the design view shows it to be editable but I am not allowed to make padding changes with the css for that div. The error msg shows "Making this change would require changing code that is locked by a template o