JBIG2 Object Stream - Extract with file header?

Hello,
I'm attempting to extract JBIG2 images only from a PDF. The only problem is that the JBIG2 images are raw data streams without a header, and so I can't just save it into a .jb2 file, as no application will recognize it.
It looks like this:
<</Subtype/Image/Width 1740/Height 3002/ColorSpace/DeviceGray/BitsPerComponent 1/Decode[1 0]/Length 12268/Filter/JBIG2Decode>>
stream
(DATA)
endstream
etc.
I can easily extract the data, but how can I repair the header?
Thank you.

You will need to learn the JB2 file format and construct one based on the data in the ImageXObject dictionary.
Don't forget that JB2 also supports a global data block in the PDF as well, you will need that too!

Similar Messages

  • Root object in Object Stream in Encrypted file

    I cannot find anywhere in the PDF Spec a prohibition on including the Root object in an Object Stream in a non-linearized encrypted file, but Acrobat products appear to assume such a restriction.
    Encrypted files where the Root obj is in an Object Stream do not open with Acrobat 7, 8 or Reader 9, but do open with GhostView/Ghostscript, Foxit, and Adobe Digital Editions.
    If the file is not encrypted there is no problem with the Root object appearing in an Object Stream, and if the Root object is a 'normal' encrypted object there is also no problem.
    Anyone any ideas?
    Matthew Fitzgerald

    Hey praveen,
    If you dont use ehp1, there is no any transaction to create root object. you can fallow this [wiki|http://wiki.sdn.sap.com/wiki/display/CRM/CreateaZBOLObjectPart1] page.
    Regards,
    Zafer,

  • Flat file extraction with FILE

    Hi BWers,
    I want to extract a flat file to BW with an infopackage.
    This flat file is located in a physical path changing according to the system :
    - in the developpment server, path is :
    ...\dev\file.csv
    - in the quality server, path is :
    ...\qual\file.csv
    - in the production server, path is :
    ...\prod\file.csv
    In the Name of the File into the infopackage extraction tab, i have to put the physical path or the logical file or routine.
    I don't want to put directly the physical path, because i would have to change this path in qual and prod servers.
    I don't want too to use a routine.
    So I created a logical file with FILE T-code. But in physical path i put :
    ...\dev\<FILENAME>
    How to put a directory variable like that : $(director)<filename> which says : if we are in Dev, so $directory =
    ...\dev\file, else qual...
    Thanks for help.
    Cheers,

    Hi,
    Here is the answer i found:
    Use in  FILE\Assignment of Physical Paths to Logical Path the variable like that:
    <V=Z_INT_SRV>
    Declare this variables in Definition of Variables.
    Z_INT_SRV

  • R12 Positive Pay eText Template with File Header/Trailer Records

    A client for whom we are implementing R12.1.3 Positive Pay uses a bank which requires file header and trailer records in the file transmission. We used the standard IBYPOS_PAY_en.rtf template file and modified it to provide the additional, required detail. The new version of the template appears to be working exactly as needed when viewing the output from the template viewer. However, when positive pay is run through eBS there is no text output generated. The XML for report is being generated, as it can be pulled from both the concurrent request log file and the iby_trxn_documents table. Below is a snippet of the pertinent information from the log file:
    After formatting length of the output - baos::0
    After formatting, output is not null
    Output type is eText, so logging the output below:
    ==================================================
    ==================================================
    length of the output - baos::0
    After formatting, periodicSeq is null or empty.nullTimestamp: Fri Jan 11 12:02:53 EST 2013
    length of the output - baos::0
    Exit: iby.scheduler.FDFormatProgramUtils.doExtractAndFormat()Timestamp: Fri Jan 11 12:02:53 EST 2013
    Saving format output to file system.
    Enter: iby.scheduler.FDFormatProgramUtils.saveToFileSystemCustom()
    Concurrent request output file name: /u02/app/appti/TCDXI/inst/apps/TCDXI_ncdx201/logs/appl/conc/out/o455658.out
    File.separator: /
    Custom file name: /u02/app/appti/TCDXI/inst/apps/TCDXI_ncdx201/logs/appl/conc/out/CDX_455658.out
    Opened file in append mode: /u02/app/appti/TCDXI/inst/apps/TCDXI_ncdx201/logs/appl/conc/out/CDX_455658.out
    Updating FND request record for the custom file location/u02/app/appti/TCDXI/inst/apps/TCDXI_ncdx201/logs/appl/conc/out/CDX_455658.out
    request id: 455658
    Exit: iby.scheduler.FDFormatProgramUtils.saveToFileSystemCustom()
    Updating positive pay file created flag on the instruction record.
    Enter: iby.scheduler.FDFormatProgramUtils.postResults()
    Sql to be executed: BEGIN IBY_FD_POST_PICP_PROGS_PVT.set_pos_pay_created(:1); END;
    Payment instruction id: 10001
    Exit: iby.scheduler.FDFormatProgramUtils.postResults()
    Successfully updated instruction record.
    Exit: iby.scheduler.FDPositivePay.runPosPay
    Program completed successfully.
    java.util.logging.ErrorManager: 2:
    oracle.core.ojdl.LoggingException: oracle.core.ojdl.LoggingException: Attempt to flush a closed LogWriter
         at oracle.core.ojdl.ExceptionHandler.onException(Unknown Source)
         at oracle.core.ojdl.BufferedLogWriter.handleException(Unknown Source)
         at oracle.core.ojdl.BufferedLogWriter.flush(Unknown Source)
         at oracle.core.ojdl.logging.ODLHandler.flush(Unknown Source)
         at oracle.core.ojdl.logging.ODLHandler.publish(Unknown Source)
         at java.util.logging.Logger.log(Logger.java:478)
         at java.util.logging.Logger.doLog(Logger.java:500)
         at java.util.logging.Logger.log(Logger.java:523)
         at oracle.ias.cache.CacheInternal.logLifecycleEvent(Unknown Source)
         at oracle.ias.cache.CacheInternal.close(Unknown Source)
         at oracle.ias.cache.Cache.close(Unknown Source)
         at oracle.apps.jtf.cache.IASCacheProvider$CacheStopperThread.run(IASCacheProvider.java:1480)
    Caused by: oracle.core.ojdl.LoggingException: Attempt to flush a closed LogWriter
         ... 10 more
    Start of log messages from FND_FILE
    Enter:TIMESTAMP:: IBY_EXTRACTGEN_PVT.Create_Extract:: 11-JAN-13 12.02.52.760550000 PM -05:00
    Enter:TIMESTAMP::Pos Pay Extract(5) ::11-JAN-13 12.02.52.761687000 PM -05:00
    Enter:TIMESTAMP:: POS Payiby.plsql.IBY_FD_EXTRACT_GEN_PVT.Create_Pos_Pay_Extract_1_0:: 11-JAN-13 12.02.52.761942000 PM -05:00
    Exit:TIMESTAMP:: POS Payiby.plsql.IBY_FD_EXTRACT_GEN_PVT.Create_Pos_Pay_Extract_1_0:: 11-JAN-13 12.02.53.121536000 PM -05:00
    Exit:TIMESTAMP::Pos Pay Extract(5) ::11-JAN-13 12.02.53.121603000 PM -05:00
    End of log messages from FND_FILE
    Executing request completion options...
    Output file size:
    0
    ------------- 1) PRINT   -------------
    Disabling requested Output Post Processing. Nothing to process. The output of the request is zero byte.
    Any help that may be offered is greatly appreciated.
    Regards,
    Paul

    I faced this issue when I ran the program as a stand alone program. Please make sure that the Postive pay file is selected in the Payment Process profile which is used to make the payment. And submit the PPR and then run the positive pay from there(Payments Manager page) by selecting the check box.

  • File I/O Using Object Streams

    My program is supposed to be a Driving instructor program that allows someone to enter a Name and Lesson Number, and it will pull up the Date, and Comments that the lesson took place. The information is saved in a file with the person's name, and saved as an array. We are required to use Object Streams for the file i/o. The only part of the program that I don't have working is the actual file i/o. The large commented section that I have in the datamanager class is the notes from the professor on the board and I haven't removed them yet. There are 4 classes for this file.
    The main class that creates the program and calls the other classes.
    import java.awt.*;
    import javax.swing.*;
    public class main {
    /** Creates a new instance of main */
    public main() {
    * @param args the command line arguments
    public static void main(String[] args)
    guiLayout labelFrame = new guiLayout(); // creates LabelFrame
    labelFrame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE);
    labelFrame.setSize(600, 200);
    labelFrame.setVisible(true);
    } The second class is the GUI class and event handler class.
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class guiLayout extends JFrame{
        private JPanel centertop;
        private JPanel centermiddle;
        private JPanel centerbottom;
        private JLabel dateLabel;
        private JLabel nameLabel;
        private JLabel lessonLabel;
        private JLabel commentsLabel;
        private JTextArea DateTextArea;
        private JTextArea NameTextArea;
        private JTextArea LessonTextArea;
        private JTextArea CommentsTextArea;
        private JButton Save;
        private JButton Retrieve;
        private String tempDay[];
        private DataManager DMO;
        /** Creates a new instance of guiLayout */
        public guiLayout()
            super("Drive Application");
            setLayout(new FlowLayout());
            dateLabel = new JLabel("Date (mm/dd/yy)");
            nameLabel = new JLabel("Name");
            lessonLabel = new JLabel("Lesson (1-10)");
            commentsLabel = new JLabel("Comments");
            DateTextArea = new JTextArea(1, 7);
            NameTextArea = new JTextArea(1, 15);
            LessonTextArea = new JTextArea(1, 2);
            CommentsTextArea = new JTextArea(6, 30);
            Save = new JButton( "Save");
            Retrieve = new JButton( "Retrieve");
            //insert into GUI
            //TOP
            centertop = new JPanel();
            centertop.add(nameLabel);
            centertop.add(NameTextArea);
            centertop.add(lessonLabel);
            centertop.add(LessonTextArea);
            centertop.add(dateLabel);
            centertop.add(DateTextArea);
            centertop.setLayout(new GridLayout(6,1));
            add(centertop, BorderLayout.NORTH);
            centermiddle = new JPanel();
            centermiddle.setLayout(new GridLayout(1,1));
            centermiddle.add(CommentsTextArea);
            add(centermiddle, BorderLayout.CENTER);
            centerbottom = new JPanel();
            centerbottom.setLayout(new GridLayout(1,3));
            centerbottom.add (Save);
            centerbottom.add(Retrieve);
            add(centerbottom, BorderLayout.SOUTH);
            ButtonHandler handler = new ButtonHandler();
            Save.addActionListener( handler);
            Retrieve.addActionListener(handler);
        private class ButtonHandler implements ActionListener
            public void actionPerformed(ActionEvent event)
                String Namein = NameTextArea.getText();
                String Datein = DateTextArea.getText();
                String Commentsin = CommentsTextArea.getText();
                int Lessonin = Integer.parseInt(LessonTextArea.getText());
                if(event.getSource()==Save)
                   DMO.Save(Namein, Datein, Commentsin, Lessonin);
                if(event.getSource()==Retrieve)
                    if(Lessonin >= 1 && Lessonin <= 10)
                       LessonRecord r = (DMO.Retrieve(Namein, Lessonin));
                    else
                        String errormess = "Lesson Number must be between 1 and 10!";
                        CommentsTextArea.setText(errormess);
    }The third class is the DataManager class which handles the actual file i/o.
    import java.io.*;
    import java.util.*;
    public class DataManager implements Serializable
        //private String Path = "P:\\D00766703\\CET431\\Assign5";
        private String Path = "C:\\Java";
        FileInputStream fin;
        FileOutputStream fout;
        ObjectInputStream oin;
        ObjectOutputStream oout;
        public String Retrieve(String name, int lesson)
            String itemFile = Path + name + ".ser";
            File f = new File(itemFile);
            if (f.exists() == true)
                try
                    if(fin == null)
                        fin = new FileInputStream(itemFile);
                        oin = new ObjectInputStream(fin);
                    LessonRecord r[] = oin.readObject();
                    if(fin.available() == 0)
                        oout.close();
                        fout.close();
                        return r[lesson - 1];
                catch(IOException ioe)
                    System.out.print(ioe);
            else
                LessonRecord LR = new LessonRecord();
                LR.date = " ";
                LR.comment = "File Not Found";
                return LR;
        /*create file object for Path\\Name
         *if file exists
         *  create fileinputstream
         *  create objectinputstream - oin
         *  read array of lesson records
         *  LessonRecord |r[] = oin.readObject();    need cast to array here
         *  close object input stream and file input stream
         *  return |r[lesson - 1];
         *else file does NOT EXIST
         *  LessonRecord LR = new LessonRecord();
         *  LR.date = " ";
         *  LR.comment = error message;
         *  return LR;
        public void Save(String name, String date, String comment, int lesson)
            String itemFile = Path + name + ".ser";
            File f = new File(itemFile);
            LessonRecord |r[];
            if (f.exists() == true)
                try
                    fin = new FileInputStream(itemFile);
                    oin = new ObjectInputStream(fin);
                    LessonRecord r[] = oin.readObject();
                catch(IOException ioe)
                    System.out.print(ioe);
            else
                r = new LessonRecord[10];
            r[lesson - 1] = new LessonRecord(date, comment);
            fout = new FileOutputStream(itemFile, true);
            oout = new ObjectOutputStream(fout);
            oout.write(r);
            oout.close();
            fout.close();
        /*create file object for Path\\Name
         *LessonRecord |r[];
         *if file exists
         *  create fileinputstream
         *  create objectinputstream - oin
         *  read array of lesson records
         *  LessonRecord |r[] = oin.readObject();    need cast to array here
         *  close object input stream and file input stream
         *else
         *  |r = new LessonRecord[10];
         *|r[lesson - 1] = new LessonRecord(date, comment);
         *createfileoutputstream(BaseDir\\Name);
         *createobjectoutputstream - oout
         *oout.write(|r);
         *closeobjectstream
         *closefilestream
    }And the fourth class is the LessonRecord class which is serializable and has the date and comments variables.
    import java.io.Serializable;
    public class LessonRecord implements Serializable
        public String Date;
        public String Comment;
        /** Creates a new instance of LessonRecord */
        public LessonRecord()
            Date = "";
            Comment = "";
        public LessonRecord(String Datein, String Commentin)
            Date = Datein;
            Comment = Commentin;
    }I could have sworn that the professor said to make it |r for the account records variable names, but I always get errors when I do that, and I need to know how to cast to an array too.

    hi Friend,
    I have made some modification to your code. and try this...I think it will help you...
    /*guiLayout.java*/
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class guiLayout extends JFrame{
        private JPanel centertop;
        private JPanel centermiddle;
        private JPanel centerbottom;
        private JLabel dateLabel;
        private JLabel nameLabel;
        private JLabel lessonLabel;
        private JLabel commentsLabel;
        private JTextArea DateTextArea;
        private JTextArea NameTextArea;
        private JTextArea LessonTextArea;
        private JTextArea CommentsTextArea;
        private JButton Save;
        private JButton Retrieve;
        private String tempDay[];
        private DataManager DMO;
        /** Creates a new instance of guiLayout */
        public guiLayout()
            super("Drive Application");
            DMO=new DataManager();
            setLayout(new FlowLayout());
            dateLabel = new JLabel("Date (mm/dd/yy)");
            nameLabel = new JLabel("Name");
            lessonLabel = new JLabel("Lesson (1-10)");
            commentsLabel = new JLabel("Comments");
            DateTextArea = new JTextArea(1, 7);
            NameTextArea = new JTextArea(1, 15);
            LessonTextArea = new JTextArea(1, 2);
            CommentsTextArea = new JTextArea(6, 30);
            Save = new JButton( "Save");
            Retrieve = new JButton( "Retrieve");
            //insert into GUI
            //TOP
            centertop = new JPanel();
            centertop.add(nameLabel);
            centertop.add(NameTextArea);
            centertop.add(lessonLabel);
            centertop.add(LessonTextArea);
            centertop.add(dateLabel);
            centertop.add(DateTextArea);
            centertop.setLayout(new GridLayout(6,1));
            add(centertop, BorderLayout.NORTH);
            centermiddle = new JPanel();
            centermiddle.setLayout(new GridLayout(1,1));
            centermiddle.add(CommentsTextArea);
            add(centermiddle, BorderLayout.CENTER);
            centerbottom = new JPanel();
            centerbottom.setLayout(new GridLayout(1,3));
            centerbottom.add (Save);
            centerbottom.add(Retrieve);
            add(centerbottom, BorderLayout.SOUTH);
            ButtonHandler handler = new ButtonHandler();
            Save.addActionListener( handler);
            Retrieve.addActionListener(handler);
        private class ButtonHandler implements ActionListener
            public void actionPerformed(ActionEvent event)
                String Namein = NameTextArea.getText();
                int Lessonin = Integer.parseInt(LessonTextArea.getText());
                if(event.getSource()==Save)
                    String Datein = DateTextArea.getText();
                     String Commentsin = CommentsTextArea.getText();
                   DMO.Save(Namein, Datein, Commentsin, Lessonin);
                if(event.getSource()==Retrieve)
                    if(Lessonin >= 1 && Lessonin <= 10)
                       LessonRecord r = (DMO.Retrieve(Namein, Lessonin));
                       System.out.println("Retrieve:"+ r.Comment+":"+r.Date);
                    else
                        String errormess = "Lesson Number must be between 1 and 10!";
                        CommentsTextArea.setText(errormess);
    /*DataManager.java*/
    import java.io.*;
    import java.util.*;
    public class DataManager implements Serializable
        //private String Path = "P:\\D00766703\\CET431\\Assign5";
        private String Path = "C:/Java";
        FileInputStream fin;
        FileOutputStream fout;
        ObjectInputStream oin;
        ObjectOutputStream oout;
        public LessonRecord Retrieve(String name, int lesson)
            String itemFile = Path + name + ".ser";
            File f = new File(itemFile);
            LessonRecord[] r=null;
            if (f.exists() == true)
                try
                    if(fin == null)
                        fin = new FileInputStream(itemFile);
                        oin = new ObjectInputStream(fin);
                    r= (LessonRecord[])oin.readObject();
                    System.out.println(r[lesson-1].Comment+":"+r[lesson-1].Date);
                catch(IOException ioe)
                    System.out.print(ioe);
                  catch(ClassNotFoundException c){
                    c.printStackTrace();
                finally
                    try {
                        if(fin!=null)fin.close();
                        if(oin!=null)oin.close();
                    } catch (IOException ex) {
                        ex.printStackTrace();
            else
                LessonRecord LR = new LessonRecord();
                LR.Date = " ";
                LR.Comment = "File Not Found";
                return LR;
        /*create file object for Path\\Name
         *if file exists
         *  create fileinputstream
         *  create objectinputstream - oin
         *  read array of lesson records
         *  LessonRecord |r[] = oin.readObject();    need cast to array here
         *  close object input stream and file input stream
         *  return |r[lesson - 1];
         *else file does NOT EXIST
         *  LessonRecord LR = new LessonRecord();
         *  LR.date = " ";
         *  LR.comment = error message;
         *  return LR;
      return r[lesson - 1];
        public void Save(String name, String date, String comment, int lesson)
            String itemFile = Path + name + ".ser";
            File f = new File(itemFile);
            LessonRecord r[]=new LessonRecord[10];
            if (f.exists() == true)
                try
                    fin = new FileInputStream(itemFile);
                    oin = new ObjectInputStream(fin);
                     r = (LessonRecord[])oin.readObject();
                catch(IOException ioe)
                    System.out.print(ioe);
                catch(ClassNotFoundException c){
                    c.printStackTrace();
                finally
                    try {
                        if(fin!=null)fin.close();
                        if(oin!=null)oin.close();
                    } catch (IOException ex) {
                        ex.printStackTrace();
            else
                r = new LessonRecord[10];
       try
            r[lesson - 1] = new LessonRecord(date, comment);
            fout = new FileOutputStream(itemFile);
            oout = new ObjectOutputStream(fout);
            oout.writeObject(r);
            oout.flush();
       catch(IOException ioe)
            finally
                try {
                    if(fout!=null)fout.close();
                    if(oout!=null)oout.close();
                } catch (IOException ex) {
                    ex.printStackTrace();
        /*create file object for Path\\Name
         *LessonRecord |r[];
         *if file exists
         *  create fileinputstream
         *  create objectinputstream - oin
         *  read array of lesson records
         *  LessonRecord |r[] = oin.readObject();    need cast to array here
         *  close object input stream and file input stream
         *else
         *  |r = new LessonRecord[10];
         *|r[lesson - 1] = new LessonRecord(date, comment);
         *createfileoutputstream(BaseDir\\Name);
         *createobjectoutputstream - oout
         *oout.write(|r);
         *closeobjectstream
         *closefilestream
    }main.java and LessonRecord.java does not have any changes so you use the old code....
    Thanks
    Edited by: rajaram on Sep 28, 2007 1:24 PM

  • Random access file with object stream

    Hi All,
    I have saved some objects in a file using object stream. While reading the sequential read is possible for me. I want to reduce the overhead of reading whole file for getting one specific object details. Is there any way in which we can implement RandomAccessFile with object stream? or is there any other alternative of reaching specific object in the file without seqential read?

    is there any
    other alternative of reaching specific object in the
    file without seqential read?Write the objects to a database.

  • Object in import-file header does not correspond to the migration object

    Hi Forum,
    I have loaded Business partner successfully with the file created in Workbench with test data.
    Now I want to load the data from Application server. But i am getting the error
    "Object in import-file header does not correspond to the migration object".
    I have read that the import file should have 3 types of record
    1. Header record corrs to the structure TEMINFO
    2. Actual data records
    3. Final record for individual object.
    I am not sure where I am making a mistake
    my files header looks like
    <004F><Space><&INFO><Company><Migration Object><User><Date><Time>
    Please help.
    Thanks in advance

    I am assuming you are in transaction EMIGIMP loading a converted migration file for import, correct?
    If so, you should be able to read the company, mig. object, user name, etc. in the import file tab overview.  If conversion did not work correctly, this info will not display here. 
    It is possible you are missing some data in the header, or spacing is not correct.  Are you converting the input file with program REMIG_FILE_TRANSFORM or are you trying to create the migration file yourself?

  • How can I write new objects to the existing file with already written objec

    Hi,
    I've got a problem in my app.
    Namely, my app stores data as objects written to the files. Everything is OK, when I write some data (objects of a class defined by me) to the file (by using writeObject method from ObjectOutputStream) and then I'm reading it sequencially by the corresponding readObject method (from ObjectInputStream).
    Problems start when I add new objects to the already existing file (to the end of this file). Then, when I'm trying to read newly written data, I get an exception:
    java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    Is there any method to avoid corrupting the stream? Maybe it is a silly problem, but I really can't cope with it! How can I write new objects to the existing file with already written objects?
    If anyone of you know something about this issue, please help!
    Jai

    Here is a piece of sample codes. You can save the bytes read from the object by invoking save(byte[] b), and load the last inserted object by invoking load.
    * Created on 2004-12-23
    package com.cpic.msgbus.monitor.util.cachequeue;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * @author elgs This is a very high performance implemention of Cache.
    public class StackCache implements Cache
        protected long             seed    = 0;
        protected RandomAccessFile raf;
        protected int              count;
        protected String           cacheDeviceName;
        protected Adapter          adapter;
        protected long             pointer = 0;
        protected File             f;
        public StackCache(String name) throws IOException
            cacheDeviceName = name;
            f = new File(Const.cacheHome + name);
            raf = new RandomAccessFile(f, "rw");
            if (raf.length() == 0)
                raf.writeLong(0L);
         * Whne the cache file is getting large in size and may there be fragments,
         * we should do a shrink.
        public synchronized void shrink() throws IOException
            int BUF = 8192;
            long pointer = getPointer();
            long size = pointer + 4;
            File temp = new File(Const.cacheHome + getCacheDeviceName() + ".shrink");
            FileInputStream in = new FileInputStream(f);
            FileOutputStream out = new FileOutputStream(temp);
            byte[] buf = new byte[BUF];
            long runs = size / BUF;
            int mode = (int) size % BUF;
            for (long l = 0; l < runs; ++l)
                in.read(buf);
                out.write(buf);
            in.read(buf, 0, mode);
            out.write(buf, 0, mode);
            out.flush();
            out.close();
            in.close();
            raf.close();
            f.delete();
            temp.renameTo(f);
            raf = new RandomAccessFile(f, "rw");
        private synchronized long getPointer() throws IOException
            long l = raf.getFilePointer();
            raf.seek(0);
            long pointer = raf.readLong();
            raf.seek(l);
            return pointer < 8 ? 4 : pointer;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#load()
        public synchronized byte[] load() throws IOException
            pointer = getPointer();
            if (pointer < 8)
                return null;
            raf.seek(pointer);
            int length = raf.readInt();
            pointer = pointer - length - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            byte[] b = new byte[length];
            raf.seek(pointer + 4);
            raf.read(b);
            --count;
            return b;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#save(byte[])
        public synchronized void save(byte[] b) throws IOException
            pointer = getPointer();
            int length = b.length;
            pointer += 4;
            raf.seek(pointer);
            raf.write(b);
            raf.writeInt(length);
            pointer = raf.getFilePointer() - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            ++count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCachedObjectsCount()
        public synchronized int getCachedObjectsCount()
            return count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCacheDeviceName()
        public String getCacheDeviceName()
            return cacheDeviceName;
    }

  • TS3989 Mssage when opening Photo Stream on-"This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel" Help!!!

    Mssage when opening Photo Stream on-"This file does not have a program associated with it for performing this action. Please install a program or, if one is already installed, create an association in the Default Programs control panel" Help!!!

    You are posting in the "icloud on my mac" forum, but your profile mentions Windows.  If using a mac, you need to have iphoto or aperture installed in order to receive new photos via photo stream.  If using windows, try posting in the iCloud on a PC forum.  You'll get better help there.
    https://discussions.apple.com/community/icloud/icloud_on_my_pc

  • Need to avoid header When using GUI_DOWNLOAD with file type "DBF"

    Hi ,
    I am downloading internal table to excel on the desktop using GUI_DOWNLOAD with file type "DBF".
    Internal table I use do not have any header.
    But I do see the header in the downloaded file.
    It displays 1 row as " F1  F2 F3..ETC" heading for each column.
    Is there any variable we need to set to suppress header.
    Thank you,
    Kumar

    Hello Dilip,
    I tried using GUI_DOWNLOAD with FILE TYPE as "DBF", and i see the problem as mentioned. My question to you is:
    1. Why do you need 'DBF' format?
    2. Is it required to save the file as '.CSV'? Can you not try to save in '.XLS' file?
    Plz revert back.
    BR,
    Suhas

  • Need to remove header When using GUI_DOWNLOAD with file type "DBF"

    Hi ALL,
    I am using GUI_DOWNLOAD function module to downlaod data to csv file . I have taken FILE TYPE as "DBF" . After download , I have found data is downloaded along with a default header . Now how can I avoid Header while downloading.
    Please help me to solve this problem.
    thanks and regards,
    Dilip
    Edited by: dilip kumar on Jun 9, 2009 11:51 AM

    Hello Dilip,
    I tried using GUI_DOWNLOAD with FILE TYPE as "DBF", and i see the problem as mentioned. My question to you is:
    1. Why do you need 'DBF' format?
    2. Is it required to save the file as '.CSV'? Can you not try to save in '.XLS' file?
    Plz revert back.
    BR,
    Suhas

  • How can I save an object Image in a file with .jpg or .gif format?

    Greetings
    I'm programming a Ray Tracer but now I need to know like save an object Image in a file with .jpg or .gif format. Could anyone help me, please? It's very important to me do this as soon as possible. Thanks.

    In 1.4 you have ImageIO available ... javax.imageio.ImageIO.write is the method to call.
    - David

  • Extract schema, each object in its own file, maintain dependencies

    Hi,
    is there a tool that exports a schema DDL so that each schema object creae statement is stored in a separated file, and a general script is provided which creates objects in the right order (dependencies).
    I know toad can do it, but it's a bit over my budget.
    Thanks

    @oraclebooks, I don't see the option to store each object on a separate file. And AFAIK, the produced script does not follow dependencies.
    @sanjay: i know I could create scripts for all object with that, but how to create a "master" script which calls each object script in the right order?

  • With PS 7  create new  Place two objects on the new file  then you may cut copy and paste Cs2  create new  place two object on the new file Cut is not available how does one cut and paste in new file

    With PS 7
    create new
    Place two objects on the new file
    then you may cut copy and paste
    Cs2
    create new
    place two object on the new file
    Cut is not available how does one cut and paste in new file

    If your using File>Place then photoshop cs2 creates what's known as Smart Objects, which photoshop 7 didn't have.
    In photoshop cs2 you can rasterize the smart objects and that should make the Cut function available.
    Select both placed layers, right click on the area to the right of the tumbnail and select Rasterize Layers.
    If in photoshop cs2 you to Help>Photoshop Help and look under Layers>Smart Objects, that should give you a good overview of what smart objects are.

  • When installing iTunes and extracting the files with Winrar I get corrupted files and cannot complete the download why is this?

    When I dont extract the files and go straight to the installer it says that the download was inturrupted and to try again and it wont work any of the times I try.

    Try clearing your browser's cache before downloading again, or try a different browser, or download the installer on a different machine, check it with Winrar or 7-Zip, then put it on a memory stick to take back to your own computer.
    You may find the direct download links and other information in Troubleshooting issues with iTunes for Windows updates useful.
    tt2

Maybe you are looking for

  • Regarding All open sales order & want to close them

    Hi All, My client want the list of all open & partially open sales order in the time period excluding cureent & previous months & want to close all those sales order with partally open & fully open status Regards, Rohan

  • 20 hrs on install, still no home page

    hello, i am trying to install oraclexe (10.2.0) on windows xp sp2, no firewall. my install completes. however, there are errors. here is an install error in C:\oraclexe\app\oracle\product\10.2.0\server\config\log\postDBCreation.log: SQL> connect "SYS

  • PGA memory problem - Oracle 10.2.0.4 on windows 2003

    Hi, I have recently started work at a new company and we are running Oracle 10g (10.2.0.4, Enterprise Edition) on Windows 2003 (Standard Edition). The server has 4Gb of RAM (and we have modified boot.ini to inclue the /3Gb switch). RE: SGA/PGA, we ha

  • Exporting parameter of type table in Method of a Class

    Hi Experts, I want to pass an internal table from my method in ABAP class to a workflow. For thi spurpose i have cretaed a parameter of type table in the method. My problem is that i am not able to bind this to a workflow/task  container. I can see a

  • What is best way to put keynote files onto Apple TV?

    I'm trying to get some Keynote presentation files to appear on my Apple TV (I'm studying for a test, and the material is all in Keynote files). I recentely figured out how to impor/export the Keynote presentations into an iPhoto format, and I've been