Import binary files

hi,
I am using netbeans javacvs api +java.Can any one plese help me out to explain how to import binary files in cvs repository with importcommand.
Which of the importcommand's method is use for import binary files.
please give me example of code to import binary files.
Thanks in advance.
Regards,
Ruchira

Please, Try WinCvs to do this.

Similar Messages

  • Import binary file in cvs repository through java cvs import command

    hi ,
    I am using netbean api for cvs command.I am having the same problem that i am not able to open binary file after importing in cvs repository.
    I want to import a directory which contain both text and binary file.
    can you please hel me out to how to import a directory which contain binary files.
    MY CODES
    ImportCommand command = new ImportCommand();
    command.setModule(module);
    command.setLogMessage(comment);
    command.setReleaseTag(releaseTag);
    command.setImportDirectory(path);
    client.setLocalPath(path);
    command.setVendorTag(vendorTag);
    Regards
    ruchira

    Please don't cross post
    http://forum.java.sun.com/thread.jspa?messageID=9455793

  • How to handle binary file at the time of import in javacvs

    hi ,
    I am using netbean api for cvs command.I am having the same problem that i am not able to open binary file after importing in cvs repository.
    I want to import a directory which contain both text and binary file.
    can you please hel me out to how to import a directory which contain binary files.
    MY CODES
    ImportCommand command = new ImportCommand();
    Map wrapperMap = new HashMap();
    String filenamePattern="*.ppt";
    KeywordSubstitutionOptions keywordSubstitutionOptions;
    Object b= KeywordSubstitutionOptions.BINARY;
    wrapperMap.put(new SimpleStringPattern(filenamePattern),b);
    command.addWrapper(filenamePattern,org.netbeans.lib.cvsclient.command.KeywordSubstitutionOptions.BINARY);
    command.setWrappers(wrapperMap);
    command.setModule(module);
    command.setLogMessage(comment);
    command.setReleaseTag(releaseTag);
    command.setImportDirectory(path);
    client.setLocalPath(path);
    command.setVendorTag(vendorTag);
    result = client.executeCommand(command, globalOptions);
    Regards
    ruchira

    Please don't cross post.
    http://forum.java.sun.com/thread.jspa?threadID=5127696&tstart=0

  • Binary file import and export in lab windows cvi

    Hello,
    I have some standard binary file format (.sie) that has been written in origin IDE. The sie type extension file format is a public format, but not defined by Origin. In origin IDE, i can be able to import these files and also be able to export it to excel as csv type. Now, i want to do the same thing in lab windows cvi. i need to import .sie type file and be able to read and export it to excel in lab windows cvi. Is this possible? Please help me to work on this project. Thanks in advance.
    Regards,
    Jayakumar.V

    Reading and writing binary file is indeed possible in CVI, the problem normally lien in the definition of the file format you want to access.
    I never found .SIE extension during my activity; a fast search on google returned this page with a link to the document explaining one file structure: it's a format dedicated to accounting so it's possibly not  your case, but could they be your files?
    Before finding the complete description of the file format you cannot think of any operation on the file itself, unless it is so self evident that you need little effort to access file content (this normally happens only on text files).
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • How do i import labview binary file into diadem

    hi,
    i am acquiring an analog input, and writing the data into a binary file. how do i access the data?
    can i import the file into Diadem? if so how?
    thanks
    jithendra

    Hi jithendra,
    Well, that IS a simple binary structure.  I didn't have all the scope VIs on my computer, so I couldn't tell-- do your binary data files always have a fixed number of channels (2, perhaps)?  If so, it would be absolutely trivial to create a DataPlugin for you, and I would be happy to do so.  Do you save your binary data files with a consistent file extension (*.bin or something)?  Then DIAdem could automatically associate that file "type" with the DataPlugin, and you could simply drag and drop your binary files into DIAdem.
    Alternatively, the TDM Header Writer VIs would also be pretty easy to use to create TDM header files for your binary files-- just make sure you set the byte order property to Big-Endian, as in the examples in that AppNote.
    Either approach ought to work fine,
    Brad Turpin
    Product Support Engineer
    National Instruments

  • How do I import binary data files (with header info) into DIAdem?

    We have lots of data acquired by nCode datagate. Files are binary data with header info. How do I import this into DIAdem? Typical (short) file attached. Also of interest, can I stream data from Sony PC208/SIR1000 recorders?
    Attachments:
    Propshft.dac ‏4 KB

    I have successfully imported your file into DIAdem using the nCode file filter included with DIAdem. You might have to make that file filter known to DIAdem by following these steps (this assumes you have version 8 of DIAdem):
    1. Go to the 'Window' menu in DIAdem and select 'Close all'
    2. Go to the 'Settings' menu and select 'GPI-DLL Registration'
    3. Click the 'Add' button in the window and select the 'GfSnCode' DLL in the 'DIAdem/AddInfo' directory
    4. The program will prompt you to restart.
    5. After you have restarted DIAdem, go to the DATA icon, select 'File - Open' from the DATA menu and in the dialog that appears, choose 'nSoft Data File Format' in the 'Files of type:' field.
    6. Select your data file and load
    That's it.
    With regards to your Sony reco
    rder data, I would need to get my hands on an actual data file to try it out. In general, DIAdem can import ANY binary file format by creating a header in the 'File - Import via header' section in DATA. If you have lots of data files from the SONY recorder, a DLL can be created for that specific file format with the free DLL toolkit included with DIAdem.
    Leave me a message here if you have any additional questions.
    Otmar
    Otmar D. Foehner
    Business Development Manager
    DIAdem and Test Data Management
    National Instruments
    Austin, TX - USA
    "For an optimist the glass is half full, for a pessimist it's half empty, and for an engineer is twice bigger than necessary."

  • How does DIADEM import TDMS files? How gets every channel his number and groupindex? How can I determine which channel has which groupindex and number?

    I store different channels in a TDMS file.
    I like to have a time channel at the first position with group index 1 and number 1.
    When I read the TDMS file with DIADEM the time channel (Float64) is on a differernt position, and the channels are not sorted alphabetically.
    Here are my questions:
    How does DIADEM import TDMS files?
    How gets every channel his number and groupindex?
    How can I determine which channel has which groupindex and number?
    Best regards
    Joerg

    Hi Jörg,
    i suppose that you´re programme whose create the *.tdms file is writing on false position. Try to create datas with timechannel on first indes in diadem, then save it and then open it again. you see that all is correct. So please tell me what programm in what version do you use and please attache it here.
    Did you use the library for creating *.tdms files like in the link ?
    http://zone.ni.com/devzone/cda/tut/p/id/6471
    Here you find the gtdms_8.x.zip - when you extract it and opened the *.llb you find vi´s for all functions e.g. writing 2d array of strings to *.tdms file
    when you open the subvi´s then you see how created and writing datas/structure to *.tdms files. Because *.tdms is binary you can´t see structure with open it in editor.
    When you don´t have Labview you can use the 30 days test of current version 8.5 under following link
    german version download link
    https://lumen.ni.com/nicif/d/lveval/content.xhtml
    english version download link
    https://lumen.ni.com/nicif/us/lveval/content.xhtml
    Hope it helps
    Best Regards

  • Can I get a list of all binary files and what they do?

    I'm a newbie to Oracle. Needless to say I'm blindly muddling my way through the experiance of installations/setup and managing my first database. I realize that there is a three tier system and for my system all three of the tiers are on the same pc! In short I need help with what executables do what. I've tried going through Linux howto's, online docs, and even bought a book on the subject but the book seems to stroke the benifits of using Oracle instead of actually telling me how to use Oracle. I'm using Oracle8i 8.1.7 EE (enterprise edition) on Linux RH 7.0. I would like a link to a list or the actuall list of all the binary files in $OracleHOME/bin/ and what each of them do. Also important log files I should consult regularly would be most helpfull. Thanks.

    While you're at it, see if you can get a complete description of all the X$ tables.

  • GUI_DOWNLOAD binary file download as XLS

    All,
    Using the following code i am generating a binary file and downloading as XLS using GUI_DOWNLOAD. But Everything working fine. But the problem is in the excel I am getting blank row and Blank column in the sheet.
    ie First row and First column in the are coming as blank. I like to avoid this blank column and row
    Any Info ?
    data : lv_heading(50)     type c.
      data:  lv_index(5)        type c.
      data:  lv_string          type string.
      data:  lv_string1         type string.
      data:  lv_xstring         type xstring.
      data:  lt_textab          type truxs_t_text_data.
      data:  ls_textab          like line of lt_textab.
      constants:
      c_tab  type c value cl_abap_char_utilities=>horizontal_tab,
      c_cret type c value cl_abap_char_utilities=>cr_lf.
      " Create Heading
      do.
        write sy-index to lv_index no-zero.
        concatenate 'CTXT_' lv_index into lv_heading.
        condense lv_heading no-gaps.
        concatenate lv_string lv_heading c_tab into lv_string.
        concatenate 'CVAL_' lv_index into lv_heading.
        condense lv_heading no-gaps.
        concatenate lv_string lv_heading c_tab into lv_string.
        if sy-index eq gv_no_col.
          concatenate c_cret c_tab lv_string into lv_string.
          exit.
        endif.
      enddo.
      call function 'SAP_CONVERT_TO_TEX_FORMAT'
        exporting
          i_field_seperator    = c_tab
        tables
          i_tab_sap_data       = <fs_table>
        changing
          i_tab_converted_data = lt_textab
        exceptions
          conversion_failed    = 1
          others               = 2.
    " Records for XLS
      loop at lt_textab into ls_textab.
        wa_out-text = ls_textab.
        lv_string1 = wa_out-text.
        concatenate lv_string c_cret c_tab lv_string1 into lv_string.
      endloop.
      clear: lv_xstring .
      call function 'SCMS_STRING_TO_XSTRING'
        exporting
          text   = lv_string
        importing
          buffer = lv_xstring.
      refresh it_binary_content .
      call function 'SCMS_XSTRING_TO_BINARY'
        exporting
          buffer     = lv_xstring
        tables
          binary_tab = it_binary_content.
    endform.                    " F_generate_output_data.

    Resolved..
    Issue is in the code
      do.
        write sy-index to lv_index no-zero.
        concatenate 'CTXT_' lv_index into lv_heading.
        condense lv_heading no-gaps.
        concatenate lv_string lv_heading c_tab into lv_string.
        concatenate 'CVAL_' lv_index into lv_heading.
        condense lv_heading no-gaps.
        concatenate lv_string lv_heading c_tab into lv_string.
        if sy-index eq gv_no_col.
          " concatenate c_cret c_tab lv_string into lv_string. "<< to be commented
          exit.
        endif.
      enddo.
    and
      loop at lt_textab into ls_textab.
        wa_out-text = ls_textab.
        lv_string1 = wa_out-text.
        concatenate lv_string c_cret lv_string1 into lv_string. " This line tab is removed
      endloop.

  • PI 7.1 Email Attachment binary file

    Hi,
    I am trying to attach a binary (encrypted) file to a regular mapped email (receiver adapter) before sending it.
    It is similiar to attach pdf-files at the end of a mapping process.
    Is there no way to attach binary files other than writing an adapter module?
    Is there no generic "Attach File" module in PI 7.11?
    I tried ASMA with XSLT, but the problem is, that the file is binary and the sender adapter would not read it without xml-format.
    Any good idea?
    thanks
    hs

    Hi Holger,
    Just a suggestion:
    1. Read the binary file using file adapter (in binary mode)
    2. use a mail package and put the read content into the Content node of it. You can use this java mapping for it
    import java.io.BufferedReader;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.Reader;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import  com.sap.aii.mapping.api.DynamicConfiguration;
    import com.sap.aii.mapping.api.DynamicConfigurationKey;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    import com.sap.aii.mapping.api.InputHeader;
    public class JavaMapping extends AbstractTransformation {
         public void transform(TransformationInput arg0, TransformationOutput arg1) throws StreamTransformationException {
         getTrace().addInfo("JAVA Mapping Called");
         //Input payload is obtained by using arg0.getInputPayload().getInputStream()
         String inData = convertStreamToString(arg0.getInputPayload().getInputStream());
         String outData = inData
         try
         //8. The JAVA mapping output payload is returned using the TransformationOutput class
         // arg1.getOutputPayload().getOutputStream()
              arg1.getOutputPayload().getOutputStream().write(outData.getBytes("UTF-8"));
         catch(Exception exception1) { }
         public String convertStreamToString(InputStream in){
         StringBuffer sb = new StringBuffer();
         try
         InputStreamReader isr = new InputStreamReader(in);
         Reader reader =
         new BufferedReader(isr);
         int ch;
         while((ch = in.read()) > -1) {
              sb.append((char)ch);}
              reader.close();
         catch(Exception exception) { }
         return sb.toString();
    Then provide the filename dynamically into the ContentType of the mail package.
    I guess this should work.
    Regards
    Suraj

  • Problem when streaming out a binary file

    Hi,
    I am trying to stream out a binary file to an output stream (not a file, but a socket). My file is a gzip file, and I was initially simply trying to open the
    file, read it to a a byte array, and writing it out to my output stream. However, I got corrupted data at my other end and it took me quite a bit of
    debugging hours to find out why.
    I tried writing to a file the same information I was writing to my output stream but, although my file was correct, my output stream still contained
    corrupted data.
    I think I have finally narrowed down my problem to the fact that when I try to write a 0x00 value to my output stream, everything gets ignored from this
    point until I write a 0x0a byte to my output stream. Obviously this produces corrupted data, since I need all the bytes of my binary file.
    If somebody can direct me as to how to write a 0x00 value to a socket output stream, I would really appreciate your input.
    This is a sample of my code (Right now I am writing byte by byte: not very efficient, but was the only way I found where I was getting a problem):
    // out is of type OutputStream
    if (Zipped){
         // In this case we just have to stream the file out
    File myFile = new File(fileName);
         FileInputStream inputFile = new FileInputStream(myFile);
         FileOutputStream fos = new FileOutputStream(new File("/tmp/zip.gz")); //zip.gz results in a good (not corrupted) file.
         ByteArrayOutputStream out1 = new ByteArrayOutputStream(1024);
         int bytes = (int)myFile.length();
         byte[] buffer = new byte[bytes];
         bytes = inputFile.read(buffer);
         while (bytes != -1) {
              out1.write(buffer,0,bytes);
              bytes = inputFile.read(buffer);
         inputFile.close();
         try {
              int count=0;
              bytes=out1.size();
              while (count<bytes){
                   fos.write(buffer,count,1);
    out.write(buffer,count,1); // when buffer[count] == 0x00, everything after it gets ignored until a 0x0a byte is written.
                   count++;
         } catch (IOException ioe) {
              SysLog.event("IOEXCEPTION: "+ioe);
         } catch (Exception e) {
              SysLog.event("EXCEPTION: "+e);
         fos.flush();
         fos.close();
         out.flush();
    out.close();
         return;
    }

    Actually, I had thought about that and for some time I tried getting rid of some of the header information in the gzipped file, and then I stopped doing that when I realized that part of the gzipped file is a CRC value which I believe is computed taking into account both the data of the file and the header information. If this is the case, then getting rid of part of the header would produce a corrupted file ... but then, I might be wrong in this issue.
    Anyway, to make my application more clear, what I am doing is writing the code for a cgi command which is suppossed to access information from a database, create an xml file, gzip it, and then send it to the client who requested the information.
    Therefore, what I am sending is an xml file (Content-Type: text/xml) in compressed format (Content-Encoding: gzip). Note that if I don't gzip the file and then send it uncompressed to the client, I have no problems. However, for me it is very important to gzip it because the size of the file can get very large and that would just take bandwidth unnecessarily.
    On the other hand, if I try to gunzip the file locally, I have no problem either (the file is not corrupt at the server's end). Therefore, my problem is when I stream it out.
    Any further help would be really appreciated!

  • Reading a binary file to string variable does not populate correctly

    Hi, I am new to Adobe Air/Flex and I'm trying to read a
    binary file which also contains text in "cleartext". The problem
    I'm having is that when I call FileStream.readUTFBytes method, only
    the first 6 characters are showing up in my string variable
    "contents" when I debug it in FlexBuilder or use a trace command
    and debug it. I have also tried with other types of files but I
    have a similar problem unless it's a non-binary file.
    Am I doing something incorrectly or should I be reading a
    binary file differently than the way I'm reading it currently?
    The source code is shown below.
    TIA,
    Magnus
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:Script>
    <![CDATA[
    import flash.filesystem.File;
    private function readFiles():void{
    var feedFile:File = File.userDirectory.resolvePath( "Local
    Settings/Application Data/Microsoft/Feeds/AppScout~.feed-ms" );
    var stream:FileStream = new FileStream();
    stream.open( feedFile, FileMode.READ );
    var contents:String =
    stream.readUTFBytes(stream.bytesAvailable);
    trace(contents);
    stream.close();
    ]]>
    </mx:Script>
    <mx:Button x="121" y="66" label="Button"
    click="readFiles()" />
    </mx:WindowedApplication>

    It's difficult to tell what it is, it looks like a binary
    pipe symbol but I can copy it from TextPad for example. Some of the
    characters following it cannot be copied from TextPad which I
    assume is because it's null. I can read the whole file in C#/.Net
    and assign it to a string variable without any problems but perhaps
    Air is somewhat limited to binary content.

  • Reading a binary file (byte swapping?): HELP!

    Hi,
    Below are 2 simple programs, one in C and the other in Java that read a binary file. The first 3 integer numbers read by the C program are:
    910, 1024437292, 100002
    The first 3 integer numbers read by the Java program are:
    -1912406016, 749473597, -1568276224
    The file was written with another C program. The values read by the C program listed here are correct.
    I supect that I have a byte swapping problem. Do you know how I can solve this problem? I really can't change the format of the input file.
    Thanks for your help,
    Miguel
    #include <stdio.h>
    void main(int argc, char *argv[]) {
    long buff[600];
    FILE *fp = fopen("c:\\inetpub\\wwwroot\\super\\wvdot3.awg","r");
    fread(buff,sizeof(int),512,fp);
    int sz = sizeof(int);
    import java.io.*;
    public class test {
    public static void main(String[] args) {
    try {
    DataInputStream din = new DataInputStream(new BufferedInputStream
    (new FileInputStream("c:\\inetpub\\wwwroot\\super\\wvdot3.awg")));
    int nrecs = din.readInt();
    int version = din.readInt();
    int routetype = din.readInt();
    System.out.println("read: " + nrecs + " " + version + " " + routetype);
    } catch (IOException exc) {
    System.out.println("IOException: " + exc);

    Yeah, the problem is byte ordering. I had to deal with the same thing, since Java is always big endian, and intel and DEC Alpha are both little endian. I assume you're original program runs on Intel.
    I ended up creating a new LittleEndianDataInputStream. Unfortunately, you can't just extend DataInputStream since all it's methods are final. You can however copy the source, rename it, and then change all the multi-byte numeric methods to reverse the byte ordering.
    For example, here is the code for the original and little endian version of readInt()
    <code>
    // DataInputStream
    public final int readInt() throws IOException {
    InputStream in = this.in;
    int ch1 = in.read();
    int ch2 = in.read();
    int ch3 = in.read();
    int ch4 = in.read();
    if ((ch1 | ch2 | ch3 | ch4) < 0)
    throw new EOFException();
    return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0));
    // LittleEndianDataInputStream
    public int readInt() throws IOException
    int ch1 = in.read();
    int ch2 = in.read();
    int ch3 = in.read();
    int ch4 = in.read();
    if ((ch1 | ch2 | ch3 | ch4) < 0)
    throw new EOFException();
    // here's the change
    return ( (ch4 << 24) + (ch3 << 16) + (ch2 << 8) + (ch1 << 0) );
    </code>

  • Downloading a binary file

    Following is a short program that attempts to copy a binary file from a remote site to a local file. I tested the program with a text file and it basically works. The problem is that the read() function does not throw an EOFException. So I have the following questions:
    1. Is there some method that accomplishes what my copyFile(...) method does?
    2. Is there a marker that signals the end of a file? Is this marker the same for text files and for binary files?
    3. Is there a better way to copy a binary file?
    Your help will be much appreciated.
    Miguel
    import java.util.*;
    import java.io.*;
    import java.awt.*;
    import java.net.*;
    public class filecopy {
    public static void main(String[] args) { 
    copyFile("http://localhost/super/input.txt","output.txt");
    static void copyFile(String mapURL,String mapName) {
    BufferedReader bin = null;
    DataOutputStream bout = null;
    try {
    URL url = new URL(mapURL);
    URLConnection connection = url.openConnection();
    bin = new BufferedReader(new InputStreamReader(connection.getInputStream()));
    bout = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(mapName)));
    while(true) {
    bout.write(bin.read());
    } catch (EOFException eofexc) {
    try {
    bin.close();
    bout.flush();
    bout.close();
    } catch (IOException ioexc) {
    System.out.println("copyFile: IOException: " + ioexc);
    } catch (IOException ioexc) {
    System.out.println("copyFile: IOException: " + ioexc);
    }

    I would highly recomend getting the file size of the remote file, and collecting data until you have a file as big as the one you want. I would do this for both binary and text files. Not all textfiles have an EOF marker, and there is no universal "EOF" marker for a binary file.
    ~Kullgen

  • Import export file from hands-on training session

    I have download the required files from the Forms hands-on training session and want to install the database. After a succesfull ftp upload of the export file (binary method) to a HP-UX system, I import the file as indicated in section 7 of the installation instructions.
    I then receive several kind of the following messages:
    Import: Release 8.0.5.0.0 - Production on Mon Aug 14 19:38:29 2000
    (c) Copyright 1998 Oracle Corporation. All rights reserved.
    Connected to: Oracle8 Enterprise Edition Release 8.0.5.0.0 - Production
    PL/SQL Release 8.0.5.0.0 - Production
    Export file created by EXPORT:V08.01.05 via conventional path
    IMP-00008: unrecognized statement in the export file:
    AD 6U
    IMP-00008: unrecognized statement in the export file:
    %G6BYI2m"<9lza`k)@Q'UQIf5{$>8@?`c=@
    IMP-00008: unrecognized statement in the export file:
    9
    IMP-00008: unrecognized statement in the export file:
    Kz`
    IMP-00008: unrecognized statement in the export file:
    Is it because of the import against a 8.0.5 database or is perhaps the export file corrupt?
    I hope you can help me.
    Best regards,
    Erika van der Aar
    E-mail: [email protected]

    Hi,
    Please go through the below blog:
    How to Export/Import and activate .sca files in SAP Composition Environment - CE local development
    Hope this helps!!!
    BR,
    Anurag

Maybe you are looking for

  • Many Songs No Longer Sync From iTunes to my iPhone

    I look in the folders in iTunes Media/Music and they're still there, but they are no longer on my iPhone or iPad and I can no longer sync them to these devices. Some of these songs I've had on my devices for years. This started when I tried to update

  • How do you make the layer mode take effect with no background in Elements?

    I have a picture of water splashing over a black background (like this: although this isn't the exact one). By turning the blending mode to "screen", I get the effect I want: it basically looks like the water is splashing over my image. The thing is,

  • Notifications not displayed on iOS8

    Since I have updated to iOS8 on my iPhone 5 I have inconsistent notifications on my lock screen. I have correctly set up the notifications in my settings however they don't always show up on the lock screen. There seems to be no reason why they do or

  • Keeping a table in place

    I'm using Pages '09, Version 4.1 I've used tables to make a crossword grid. One with letters supplies the solutiuon. The other can be numbered in the top left hand corner. I've sussed all that. Now I need to keep the grid in place and add text boxes

  • Can Java reflect not only .Class file

    Hi' i'm newbie in this topic, i'm really appreciate if somebody can help me..cos i'm really stuck in here... My Problems are : 1. i want to ask about this, can Java reflect from .java file? 2. i'm using Eclipse IDE, i'm really interesting about how J