Writing int [ ] Array in a file

Hye
Can you tell me which Stream I can use to write an Integer Array (defined as int [ 7000]) in a file .txt
I want to write as a whole not one by one.
Thanks

import java.util.Vector;
import java.io.*;
public class Queue extends Vector {
  ** FIFO, first in first out
  Queue() {
  super();
void put(Object o) {
  addElement(o);
Object get() {
  if (isEmpty()) return null;
    Object o = firstElement();
    removeElement(o);
    return o;
Object peek() {
  if (isEmpty()) return null;
    return firstElement();
To serialize (save the Queue state to a file) :
public static void main(String args[]) {
  Queue theQueue;
  theQueue = new Queue();
  theQueue.put(new int[]{1, 2, 3, 4});
  theQueue.put("ABCDE");
  theQueue.put(new Integer(3));
  System.out.println(theQueue.toString());
  // serialize the Queue
  System.out.println("serializing theQueue");
  try {
      FileOutputStream fout = new FileOutputStream("thequeue.dat");
      ObjectOutputStream oos = new ObjectOutputStream(fout);
      oos.writeObject(theQueue);
      oos.close();
   catch (Exception e) { e.printStackTrace(); }
To unserialize (to load a previously saved Queue) :
public static void main(String args[]) {
   Queue theQueue;
   theQueue = new Queue();
   // unserialize the Queue
   System.out.println("unserializing theQueue");
   try {
    FileInputStream fin = new FileInputStream("thequeue.dat");
    ObjectInputStream ois = new ObjectInputStream(fin);
    theQueue = (Queue) ois.readObject();
    ois.close();
   catch (Exception e) { e.printStackTrace(); }
   System.out.println(theQueue.toString());    
}hope that helps

Similar Messages

  • Saving int [][][][] array to a file

    Hello...
    I realize that I can save the array to a file by saving each bit of information separately, and then recalling it...
    I was curious whether it is possible to save an int[][][][] array to a file "as it is". that is, some way of just exporting the array to a file and then recalling it. if it is not possible, saying so is also helpful.
    Thanks.

    yes... well... i didn't necessarily mean a 4D array was common. i meant it would seem a common desire to store any array, even 1d, or an ArrayList, or anything really... other than being able to write JUST at int, or just a String, or just a double. see... it can take about 10 minutes to create this 4d array; so i can save that time by just recalling it from a file in about 2 seconds... would have figured this wasn't too uncommon of a desire... though not common enough probably.

  • Help!! Trying to writing an array to a file without having to rewrite the old data every time.

    Hey Everyone,
    I have a vi that takes a 2D array and writes it to an xml file. The purpose for this is to characterize the pathloss through a dowkey 10x10 matrix at varies frequencies. I use this program to create a look-up table for the switch matrix so when I conduct one of my automated tests I can obtain an accurate measurment. The problem with this is I am taking about 299 data points per switch matrix combination leading me to over 32000 data points in the look-up table. The reason I use xml is because each data point needs a header so I can parse through the look-up table with another one of my vi's when I need that pathloss. What I am trying to fix is that when my vi writes to a file it writes one array at a time to save memory space. When it writes it rewrites the old data then the new data. As the number of data points increase so does the lag time to write to the file. By the time I am done it takes about five hours to fully write to the file. Does anyone know of a way to write continuesly write to a file without having to rewrite all of the old data? Attached is my vi for writing to the file, my vi for searching through the file, and an example of one of my look-up tables.
    Thanks,
    Dustin
    Solved!
    Go to Solution.
    Attachments:
    Find Array_TestStand.vi ‏22 KB
    Write to XML.vi ‏21 KB
    Pathloss_Array_tests.zip ‏149 KB

    dlovell wroteoes anyone know of a way to write continuesly write to a file without having to rewrite all of the old data?
    The only way to do that is to only append to the end of your file.  This would probably require some rewriting of your header information.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Writing random array positions to file

    Hi all.
    I have an array of 1000 positions each consisting of a String.
    I want to write the strings equally to two seperate text files which i have managed without any probs.
    The problem is i want to write these strings in a total random order so each time its run different strings would end up in different files and in total different order.
    i know how to generate a random number but not sure how to access all positions of the array but in random order.
    Any help would be appreciated.
    thanks

    The Random class has methods that generate random ints.
    You can use those ints to index the array and get the String from that position.
    http://java.sun.com/j2se/1.5.0/docs/api/java/util/Random.html

  • Writing an integer array to a file...

    Okay, so I just wanna write a sorted integer array to file... but I'm having a problem or two.
    int[] array = read(new File("C:\\college work\radixsort.txt");
    radixSort(array, array.length);That text file is a list of 30 numbers.
    After the radixSort method is called the values in the text file are sorted into the correct order. Then I want to write the sorted values to a text file radixSorted.txt
    I had too many problems with printArray() so I figured this could be easier.
    I have tried FileInputStream and FileWriter but no luck.
    I don't want the answer, but just something to help point me in the right direction.
    Thank you.

    pri.println(char[] x) looks like the one I am looking for.
    I have modified the code. I've placed only the println part inside the loop now, but it's just the pri.println(char[], array) now. I'm nearrrrly there! (I think).
    try
                   PrintWriter pri = new PrintWriter(new FileWriter("C:/college work/radixsort.txt", true));
                   for (int h = 0; h < array.length; h++)
                        pri.println(char[], array);
              catch (Exception e)
                   e.printStackTrace();
                   System.out.println("No such file exists.");
              finally
                   pri.close();
              }Edited by: JayJay88 on Nov 8, 2008 1:16 PM

  • Writing txt file to int array

    The project I was assigned is to write a program that takes numbers from a text file (all on one line, separated by spaces) and store them into a 5-element array. The program is supposed to check and see if the array is big enough to hold all the numbers from the text file, and if it isn't, it is supposed to double that array size. I've written the following code and it compiles, but it will not run due to this error:
    Exception in thread "main" java.lang.NullPointerException
         at java.io.Reader.<init>(Reader.java:61)
         at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
         at ArrayReader.main(ArrayReader.java:16)
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.
    This is what I have so far. If anyone could help me or point out anything I missed it would be greatly greatly appreciated.
    import java.io.*;
    public class ArrayReader
         public static void main(String[] args)
              File file = new File("numberlist.txt");
              FileInputStream fis = null;
              BufferedReader br = new BufferedReader (new InputStreamReader(fis));
              int i = 5;
              int x = 0;
              int[] array;
              array = new int;
              try
                   fis = new FileInputStream(file);
                   for (x = 0; x < array.length; x++)
                             if (x > array.length)
                                  i = i*2;
                                  System.out.println("Array too small. Doubling size to: " + i);
                             else
                                  array[i] = fis.read();
              catch(FileNotFoundException e)
                   System.out.println("File " + file.getAbsolutePath() +
                                            " could not be found on filesystem");
              catch(IOException ioe)     
                   System.out.println("Exception while reading the file" + ioe);
              for (i = 0; i < array.length; i++)
                   System.out.println(array[i]);

    ursusmajx wrote:
    Exception in thread "main" java.lang.NullPointerException
         at java.io.Reader.<init>(Reader.java:61)
         at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
         at ArrayReader.main(ArrayReader.java:16)Start by looking at line 16 in ArrayReader.main. It's not lie 16 in the code you posted here, so either you haven't posted the code you tried to run or you're not running the code you think you are.
    I do see where you are using fis before assigning it a value.
    db

  • Problem with reading numbers from file into double int array...

    Okay, this is a snippet of my code:
    public void readMap(String file){
            try {
                URL url = getClass().getResource(file);
                System.out.println(url.getPath());
                BufferedReader in = new BufferedReader(new FileReader(url.getPath()));
                String str;
                String[] temp;
                int j=0;
                while ((str = in.readLine()) != null) {
                    temp = str.split(",");
                    for(int i=0;i<temp.length;i++){
                        map[j] = java.lang.Integer.parseInt(temp[i]);
    j++
    in.close();
    } catch (IOException e) {
    System.out.println("Error: "+ e.toString());
    map[][] is a double int array. Now, the code is running through each line of the text file (with each line looking like this: 0,3,6,2,2,3,1,5,2,3,5,2), and I want to put the numbers into a corresponding double int array (which is where map[][] comes in). Now, this code WOULD work, except I need to set the sizes of each array before I start adding, but I don't know how to get the exact sizes.. how can I get around this issue?
    Message was edited by:
    maxfarrar

    You can do a two-dimensional ArrayList? That syntax
    you wrote didn't work.
    I tried doing:
    private ArrayList<ArrayList><Integer>> map;
    Your syntax is just wrong -- or, this forum software has bug in handling angle brackets.
    ArrayList<ArrayList<Integer>>...The closing angle bracket after the second 'ArrayList' is the one generated by the bug. Basically, it should be T<T<T2>> without spaces. Oh, for that matter:
    Arraylist<ArrayList<Integer>>

  • Reading text file(array of 2d) and putting in a int array , help required.

    import java.io.*;
    import java.util.*;
    public class lastphase
         public static int[][] getData(File f) throws IOException {
              ArrayList line = new ArrayList();
              BufferedReader br = new BufferedReader(new FileReader(f));
              String s = null;
              while ((s = br.readLine()) != null)
                   line.add(s);
              int[][] map = new int[line.size()][];
              for (int i = 0; i < map.length; i++) {
                   s = (String) line.get(i);
                   StringTokenizer st = new StringTokenizer(s, " ");
                   int[] arr = new int[st.countTokens()];
                   for (int j = 0; j < arr.length; j++)
                        arr[j] = Integer.parseInt(st.nextToken());
                   map[i] = arr;
              return map;
         public static void main(String[] args) throws Throwable {
              int[][] map = getData(new File(args[0]));
              for (int i = 0; i < map.length; i++) {
                   for (int j = 0; j < map.length; j++)
                        System.out.print(map[i][j] + " ");
                   System.out.println();
    here is code but when i run java lastphase it gives error stating
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
    at lastphase.main(lastphase.java:37)
    can anybody tell whys dat case and where i need to change the code

    In my endevor to complete my work i got my answer
    thanks people for sharing ur knowldeg with usCare to share your solution to the mentioned problem?
    kind regards,
    Jos
    ps. I just browsed through your code, but couldn't find an obvious 'blooper' ;-)

  • Reading content of a file into an int array

    How do i use FileReader rd = new FileReader(filename) to read the contents into an int array?

    public static int[] parse_file(String filename)
         Vector vec = new Vector();
         int num[];
         num = new num[vec.size()];
         try {
              BufferedReader br = new BufferedReader(new FileReader(filename));
              String line;
              while((line = br.readLine()) != null) {
              vec.add(line);
              for (int i = 0; i < vec.size(); i++) {
              num[i] = (int) vec.get(i);
              System.out.println("Number=" + num);
         catch(IOException e) {
              System.out.println("error");
         return num;
    Maxsum.java:22: cannot resolve symbol
    symbol : class num
    location: class Maxsum
         num = new num[vec.size()];
    ^
    Maxsum.java:30: inconvertible types
    found : java.lang.Object
    required: int
              num[i] = (int) vec.get(i);
    How do i initialize the array?if i do not initialize it, there'll be array not initialized error also..How do i convert the String to int?

  • Saving An Object Array to a File

    Please Help,
    I am fairly new to Java. I am trying to write a program that inputs merchandise information (ItemName, Description, Price, etc�) to an object array. The program works internally with the array perfectly, but I can�t get it to save the array to a file so it can be read and reused the next time the program is run. The class the array is built on implements Serializable, but when it tries to save it to a file, it throws an exception message saying that my object is not serializable.
    Does anyone have some code to help me save information to an array (so it can be used within the program), save the array to a disk file, and read the file back into the program the next time the program opens?
    Thank you,
    Bob

    Thank you for your help. The total code is quite lengthy so I�ve tried to pick the most relevant code to include here.
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.text.*;
    import java.io.*;
    public class Class1 extends WindowAdapter implements ActionListener
    // Object Array Declaration.
    ItemInfo ItemArray[] = new ItemInfo[100];
    * This is the Inner Class that the Array is built on. I have two constructors in it because I
    * tried several different methods to make this write to the disk file
    public class ItemInfo implements Serializable
         int ItemNum;
         int DeptNum;
         String ItemName;
         String Model;
         String Description;
         float Price;
         int Units;
    // Constructors
         public ItemInfo() {};
         public ItemInfo(int inItemNum, int inDeptNum, String
                             inItemName, String inModel, String
                             inDescription, float inPrice, int inUnits)
              ItemNum = inItemNum;
              DeptNum = inDeptNum;
              ItemName = inItemName;
              Model = inModel;
              Description = inDescription;
              Price = inPrice;
              Units = inUnits;
    } // end class ItemInfo.
    * openOutputStream() *
         private void openOutputStream()
              try
              // create file and output object streams
                   outputItemFile = new FileOutputStream("A:ItemFile.txt");
                   objSaveItems = new ObjectOutputStream(outputItemFile);
              } // end try
              catch (Exception error)
                   System.err.println("Error opening file");
              } // end catch
         } // end openOutputStream().
    * closeOutputStream() *
         private void closeOutputStream()
              try
                   objSaveItems.close();
                   outputItemFile.close();
              catch (IOException error)
                   System.err.println("Error Closing File");
              } // end catch
         } // end closeOutputStream().
    * AddToItemArray() - This method just assigns the information to the Array elements *
         private void AddToItemArray()
              int ArrayNum = intItemFileSize - 1;
              ItemArray[ArrayNum] = new ItemInfo();
              ItemArray[ArrayNum].ItemNum = intNewItemNum;
              ItemArray[ArrayNum].DeptNum = intDeptNum;
              ItemArray[ArrayNum].ItemName = strItemName;
              ItemArray[ArrayNum].Model = strModel;
              ItemArray[ArrayNum].Description = strDescription;
              ItemArray[ArrayNum].Price = fltPrice;
              ItemArray[ArrayNum].Units = intUnits;
         } // end AddToItemArray().
    * WriteToFile() - This is the latest effort to write to the file. The file gets opened, and
    * the first element gets printed, but after that nothing but error messages (printed * below).
         private void WriteToFile()
              try
                   openOutputStream();
                   for (int a = 0; a <= intItemFileSize; a++)
                        objSaveItems.writeObject(ItemArray[a]);
                        objSaveItems.flush();
                   closeOutputStream();
              } // end try.
              catch (Exception error)
                   System.err.println("Error writing to file");
         } // end WriteToFile().
    This is what appears on the disk file after I run the program (three items entered):
    � sr Class1$ItemInfo�&q����B I DeptNumI ItemNumF PriceI UnitsL
    Descriptiont Ljava/lang/String;L ItemNamet Ljava/lang/String;L Modelt Ljava/lang/String;L this$0t LClass1;xp A��� t
    Claw Hammert Hammert CL550{sr  java.io.NotSerializableException(Vx �� 5   xr  java.io.ObjectStreamExceptiond��k�9��   xr  java.io.IOExceptionl�sde%��   xr  java.lang.Exception��> ; �   xr  java.lang.Throwable��5'9w��   L
    detailMessaget  Ljava/lang/String;xpt  Class1
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to retrieve arrays from a file.

    If i were to save 5 arrays to a file like this.....
    DataOutputStream output;
         DataInputStream input;
         Date today = new Date();
         String filename = "phonebook";
    private String name[] = {""};
         private String surname[] = {""};
         private String home[] = {""};
         private String work[] = {""};
         private String cell[] = {""};
         try
                   output = new DataOutputStream(new FileOutputStream(filename));
              catch(IOException io)
                   JOptionPane.showMessageDialog(null,"This program could not create a storage location. Please check the disk drive and the tun the program again.","Error",JOptionPane.ERROR_MESSAGE);
                   System.exit(1);
    public void save()
              try
                   for(int i=0; i < name.length; i++)
                        output.writeUTF(name);
                        output.writeUTF(surname[i]);
                        output.writeUTF(work[i]);
                        output.writeUTF(home[i]);
                        output.writeUTF(cell[i]);
                   JOptionPane.showMessageDialog(null,"Data succesfully saved to file.","Information message",JOptionPane.INFORMATION_MESSAGE);
              catch(IOException io)
                   System.exit(1);
         }And then I want to use them again on my startup. How would I go about initialising them back into thier origianl arrays. What i mean is I want the arrays to contain theier previous saved values. Is this possible.
    I tried to do it like this but it wont work. I get no errors. It just wont return and strings at all.try
                   input = new DataInputStream(new FileInputStream(filename));
              catch(IOException io)
                   JOptionPane.showMessageDialog(null,"Could not find the correct file to read data from.","Error",JOptionPane.ERROR_MESSAGE);
              try
                   for(int i=0; i< name.length; i++)
                        name[i]=input.readUTF();
                        surname[i]=input.readUTF();
                        work[i]=input.readUTF();
                        home[i]=input.readUTF();
              cell[i]=input.readUTF();
              catch(IOException io)
              }Or is it better to create a seperate file for each array?
    Edited by: Yucca on Mar 23, 2008 2:24 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Any help here please.
    Edited by: Yucca on Mar 23, 2008 6:34 PM

  • Time Stamp problem while writing data into the excel file

    Hii, All
                  I am taking the data from the DAQ card of the TOPSCCC with the 8 ms of scanrate for each channel and there are total 16 no of Analog channels in the Card, now i am acquiring the data from the card, time stamping it and writing it into the excel file, which is tab delimited, now the problem is, the data which are in the excel file have the same timestamp for 4 to 5 continuous records, instead we want each data with the different and continuous time stamp with same difference of time stamp between two records, mean if it is difference of 8 ms then it should be the 8 ms for all, but here it is taking the differnce of 16 ms for two samples and giving same time stamp for four to five records and that shouldn't happen, here i am attaching my vi, drivers for the cards and Excel file with the data, can you please give me any suggestion how to do it?
           Please help me i require this suggestion as early as possible, i am requiring it urgently.
    Thanks in Advance,
    Nishant
    Attachments:
    2026vi.llb ‏319 KB
    2026_ScanMultAD_Demo_time.vi ‏80 KB
    Data.xls ‏357 KB

    Hello Nishant,
    that's what I meant:
    Message Edited by GerdW on 05-16-2006 10:32 AM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    timestamp-array.png ‏2 KB

  • Help With Writing A Vector To A File

    hi
    i am having trouble writing a vector to a file
    Here is my code
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import javax.swing.filechooser.*;
    public class Save
         JFileChooser fc = new JFileChooser();
         public Save(JFrame par, mainCollection col)
         try
         ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream fc.getSelectedFile().getName()));
         out.writeObject(col.carCollection);
         for(int i = 0; i< col.carCollection.size();i++)
         Cars cd = (Cars)col.carCollection.elementAt(i);
         Vector v = cd.getModels();
         out.writeObject(v);
         }catch(FileNotFoundException e){System.out.println("not found");}
         catch(IOException e){System.out.println("IO" + e.getMessage());}
    Ok now the mainCollection col is from my other class mainCollection which has my main vector in it. This main vector contains car types which contain car models i.e. Ford which contains Falcon. What i need to do is copy the whole contents of vector over in one go to the file.
    With the code above i am getting IO Exception errors
    here is the errors
    �� sr java.util.Vector��}[�;� I capacityIncrementI elementCount[ elementDatat [Ljava/lang/Object;xp       ur [Ljava.lang.Object;��X�s)l  xp  
    {sr  java.io.NotSerializableException(Vx ��5  xr java.io.ObjectStreamExceptiond��k�9��  xr java.io.IOExceptionl�sde%��  xr java.lang.Exception��>;�  xr java.lang.Throwable��5'9w�� L
    detailMessaget Ljava/lang/String;xpt Cars
    Whatever all that means
    Thanks for your help, i'm really confused
    DaJavaLodown
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Remove the for loop.
    If you write the vector, it's content will be written too.
    hi
    i am having trouble writing a vector to a file
    Here is my code
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import javax.swing.filechooser.*;
    public class Save
         JFileChooser fc = new JFileChooser();
         public Save(JFrame par, mainCollection col)
         try
    ObjectOutputStream out = new
    = new ObjectOutputStream(new FileOutputStream
    fc.getSelectedFile().getName()));
         out.writeObject(col.carCollection);
    for(int i = 0; i<
    = 0; i< col.carCollection.size();i++)
    Cars cd =
         Cars cd = (Cars)col.carCollection.elementAt(i);
         Vector v = cd.getModels();
         out.writeObject(v);
    }catch(FileNotFoundException
    ion e){System.out.println("not found");}
    catch(IOException e){System.out.println("IO" +
    " + e.getMessage());}
    Ok now the mainCollection col is from my other class
    mainCollection which has my main vector in it. This
    main vector contains car types which contain car
    models i.e. Ford which contains Falcon. What i need to
    do is copy the whole contents of vector over in one go
    to the file.
    With the code above i am getting IO Exception errors
    here is the errors
    �� sr java.util.Vector��}[�;� I
    capacityIncrementI elementCount[ elementDatat
    [Ljava/lang/Object;xp       ur
    r [Ljava.lang.Object;��X�s)l  xp  
    {sr  java.io.NotSerializableException(Vx ��5  xr
    java.io.ObjectStreamExceptiond��k�9��  xr
    java.io.IOExceptionl�sde%��  xr
    r java.lang.Exception��>;�  xr
    java.lang.Throwable��5'9w�� L
    detailMessaget Ljava/lang/String;xpt Cars
    Whatever all that means
    Thanks for your help, i'm really confused
    DaJavaLodown

  • I/O Error when writing access Log buffer to file. error number: 28

    Hi,
    Oracle OracleAS Web Cache 10.1.2.3.0, Build 10.1.2.3.0 080201 is writing events like this:
    [alert 13215] I/O Error when writing access Log buffer to file. error number: 28
    I've looked for this alert and i've found this description:
    WXE-13215 I/O Error when writing access Log buffer to file. error number: %d
    Severity: alert
    Cause: I/O error happened when OracleAS Web Cache tried to write to the access log file.
    Action: Check the status of access log file. For example, see if the disk is full
    Anybody knows what "error number: 28" stands for? The logs are sended to other server and it seems that the disk size is ok.
    thanks!

    I tested again...it seems LabVIEW doesn't like the way I wrote the measurement files. I attached a set of VIs (ZIP-file) to give you a clue how it was done. When I try to save and read a file containing just plain DBLs from a 1D-Array (see attached file generating VI) it works perfectly well for large file sizes.
    So there might get something messed up by the way LabVIEW saved the measured data. You'll notice, that I (accidentally) left the "prepend array string size" input of "write to binary file" function unwired which means that the size information will be written as a type of header. Maybe this is the reason that it doesn't work as expected...
    Attachments:
    VibrationMeasurement.zip ‏76 KB
    generate_test_bin_data.vi ‏12 KB

  • Returning int array from C to Java as method parameter

    Hello,
    I've been trying to accomplish this
    Java
    int[] myArray = ... (filled with some data);
    int retCode = myNativeCall(myArray);
    if(retCode == 0)
    doSomethingWith(myArray); //myArray gets overwritten with new data (with new size also) during the native call...
    C
    JNIEXPORT jint JNICALL Java_GenChav_rsaEncrypt(JNIEnv *env, jobject obj, jintArray myArray){
    jintArray outbuf;
    int[] new_array = .. // some function will fill this....
    int new_array_length = ...//some function will give me the new size, not big, 512 max...
    jint tmp[new_array_length]; //allocate..need something more ??
    memcpy(tmp, new_array, new_array_lenght);
    outbuf=(*env)->NewIntArray(env, new_array_length);
    (*env)->SetIntArrayRegion(env, outbuf, 0, new_array_length, tmp);
    myArray=outbuf;
    I tought this way I would have a updated myArray ints on the Java program...
    Any thought??

    user5945780 wrote:
    Ok, let's try to be constructive here...
    How I do implement a return type for my method like a int array ?First realized it has nothing to do with JNI. So the same question and answer applies to java only.
    >
    like:
    int[] return = myNativeCall();
    Yes.
    Then I will look for return[0], if it is == to 0, fine, it means a successful calculation by the native code. Not sure what that means. The structure of what you return it up to you.
    It can help when you are unsure of what to do in JNI....write a pseudo representation of what you want to do in a java method. Then translate that java method into JNI, everything in the pseudo method must be in the JNI code.

Maybe you are looking for

  • How do I bookmark ALL tabs at one time?

    Firefox 3 allow all tabs to be bookmarked at one time. Please let me know how to do this with version 4. Thanks!

  • HTML Application "Frozen"

    I've just encountered a BW3.5 system with the following very strange behaviour with SP16 (ABAP, Basis and BW) I cretae a web interface for a planning layout. Activation goes well and when sent to Internet Explorer appears fine BUT...nothing works fro

  • How to convert a directory of .doc files to flashpaper swf files

    Hi, We are looking forward to use flashpaper as a preview system for showing documents in our ASP.NET app. We require .NET APIs that can be used to convert office/pdf files to flashpaper2 files. Is this possible or supported? If yes then How can we a

  • Need a SCCM SQL Query Report for Installed Software with Packages and Applications.

    I need a report that will show the number of installs of all of the workstations applications and packages over a given period of time.  This will let us know how effective our deployments are and how well the on-demand software is being adopted. Any

  • Could somebody PLEASE help me?? thankk youu!!!

    my iPod is frozen!! does anybody know how to unfreeze it? i have already tried turning the hold button on and off, holding down the select and menu button, etc ... the time is even frozen. it froze on the song title page. if ANYBODY could PLEASE help