Package java.io

Examples of java.io.RandomAccessFile.writeInt()


            /* length */
            /* Frame_sec_len computed above */
            fout.writeInt(Frame_sec_len - Frame_hdr_len);

            /* physical index (offset) */
            fout.writeInt(TOC_Nitf_hdr_size + RpfHeader.HEADER_SECTION_LENGTH
                    + Loc_sec_len + Bound_sec_len + Frame_hdr_len);

            if (Debug.debugging("maketoc")) {
                Debug.output("MakeToc: boundary section at : "
                        + fout.getFilePointer());
View Full Code Here


                Debug.output("MakeToc: *** writing boundary rectangles ***");
            }

            /* Subheader */
            /* boundary rectangle table offset */
            fout.writeInt(0);

            /* # of boundary rectangle records */
            fout.writeShort((short) groupCount);

            /* boundary rectangle record length */
 
View Full Code Here

                fout.writeDouble(group.h_resolution);
                fout.writeDouble(group.v_interval);
                fout.writeDouble(group.h_interval);

                /* # frames */
                fout.writeInt((int) (group.bottom - group.top));
                fout.writeInt((int) (group.right - group.left));
            }

            if (Debug.debugging("maketoc")) {
                Debug.output("MakeToc: *** writing frame section ***");
 
View Full Code Here

                fout.writeDouble(group.v_interval);
                fout.writeDouble(group.h_interval);

                /* # frames */
                fout.writeInt((int) (group.bottom - group.top));
                fout.writeInt((int) (group.right - group.left));
            }

            if (Debug.debugging("maketoc")) {
                Debug.output("MakeToc: *** writing frame section ***");
                Debug.output("MakeToc: started with a 'U'");
View Full Code Here

            charArray[0] = 'U';
            charString = new String(charArray);
            fout.writeBytes(charString);

            /* frame file index tbl offset */
            fout.writeInt(0);

            /* # of frame file index records */
            fout.writeInt(nFrames);

            /* # of pathname (directory) records */
 
View Full Code Here

            /* frame file index tbl offset */
            fout.writeInt(0);

            /* # of frame file index records */
            fout.writeInt(nFrames);

            /* # of pathname (directory) records */
            /* DKS NEW: was nFrames: */
            fout.writeShort(uniq_dir_cnt);

View Full Code Here

                /*
                 * ui = head.HEADER_SECTION_LENGTH + Loc_sec_len +
                 * Bound_sec_len + Frame_hdr_len +
                 * nFrames*Frame_index_rec_len + pathname_pos[i] ;
                 */
                fout.writeInt((int) (nFrames * Frame_index_rec_len + pathname_pos[i]));

                String framename;
                tail = frame.filename.lastIndexOf(File.separatorChar);
                if (tail == -1) {
                    framename = frame.filename;
View Full Code Here

            /*
             * Go back and fill in component aggregate length in
             * location section
             */
            fout.seek(agg_loc);
            fout.writeInt((int) (Bound_sec_len + Frame_sec_len));

            fout.close();
            Debug.message("maketoc", "MakeToc: *** Normal end of make-toc ***");

        } catch (IOException ioe) {
View Full Code Here

        continue;
      }
      long eventPosition2 = reader.getPosition();
      rec = reader.next();
      handle.seek(eventPosition1 + 100);
      handle.writeInt(random.nextInt());
      corrupted++;
      corruptFiles.add(dataFile.getName());
      if (rec == null ||
        rec.getEvent().getClass().getName().
          equals("org.apache.flume.channel.file.Commit")) {
View Full Code Here

        handle.close();
        reader.close();
        continue;
      }
      handle.seek(eventPosition2 + 100);
      handle.writeInt(random.nextInt());
      corrupted++;
      handle.close();
      reader.close();

    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.