Package java.io

Examples of java.io.RandomAccessFile.writeShort()


            /* DKS. Can't write structure because of pad bytes */
            /* fwrite(&head, sizeof(head), 1, fout); */

            fout.writeBoolean(head.endian); // Big Endian - should
            // match head.endian
            fout.writeShort(RpfHeader.HEADER_SECTION_LENGTH);
            fout.writeBytes("       A.TOC"); // has to be padded.
            fout.writeByte(head.neww);

            fout.writeBytes(head.standardNumber);
            if (head.standardNumber.length() < 15) {
View Full Code Here


                                        */

            /* 14 + 4 * 10 = 54 */
            Loc_sec_len = Loc_hdr_len
                    + (RpfFileSections.TOC_LOCATION_KEY * Loc_sec_comp_len);
            fout.writeShort(Loc_sec_len);
            /* compon. loc tbl offset: location section hdr length */
            fout.writeInt(Loc_hdr_len);
            /* # records in location section: 4 */
            fout.writeShort(RpfFileSections.TOC_LOCATION_KEY);
            /* component location record length: 10 */
 
View Full Code Here

                    + (RpfFileSections.TOC_LOCATION_KEY * Loc_sec_comp_len);
            fout.writeShort(Loc_sec_len);
            /* compon. loc tbl offset: location section hdr length */
            fout.writeInt(Loc_hdr_len);
            /* # records in location section: 4 */
            fout.writeShort(RpfFileSections.TOC_LOCATION_KEY);
            /* component location record length: 10 */
            fout.writeShort(Loc_sec_comp_len);

            if (Debug.debugging("maketoc")) {
                Debug.output("MakeToc:\n  location section length: "
View Full Code Here

            /* compon. loc tbl offset: location section hdr length */
            fout.writeInt(Loc_hdr_len);
            /* # records in location section: 4 */
            fout.writeShort(RpfFileSections.TOC_LOCATION_KEY);
            /* component location record length: 10 */
            fout.writeShort(Loc_sec_comp_len);

            if (Debug.debugging("maketoc")) {
                Debug.output("MakeToc:\n  location section length: "
                        + Loc_sec_len + "\n  location header length: "
                        + Loc_hdr_len + "\n  number of location records: "
View Full Code Here

            Frame_sec_len = Frame_hdr_len + nFrames * Frame_index_rec_len
                    + path_table_len;

            /* START LOCATION RECORD 1 */
            /* ID #: */
            fout.writeShort((short) RpfFileSections.LOC_BOUNDARY_SECTION_SUBHEADER);

            // The boundary section subheader is the first part of the
            // bounfary rectangle section. The boundary section comes
            // right after the header (in this program - the spec will
            // allow it to be anywhere).
View Full Code Here

            fout.writeInt(TOC_Nitf_hdr_size + RpfHeader.HEADER_SECTION_LENGTH
                    + Loc_sec_len);

            /* START LOCATION RECORD 2 */
            /* ID #: */
            fout.writeShort((short) RpfFileSections.LOC_BOUNDARY_RECTANGLE_TABLE);

            /* Boundary rectangle table length */
            Bound_tbl_len = groupCount * Bound_rec_len;
            fout.writeInt(Bound_tbl_len);

View Full Code Here

            Bound_sec_len = Bound_hdr_len + Bound_tbl_len;

            /* START LOCATION RECORD 3 */
            /* ID #: */
            fout.writeShort((short) RpfFileSections.LOC_FRAME_FILE_INDEX_SUBHEADER);

            /* length */
            fout.writeInt(Frame_hdr_len);

            /* physical index (offset) */
 
View Full Code Here

            fout.writeInt(TOC_Nitf_hdr_size + RpfHeader.HEADER_SECTION_LENGTH
                    + Loc_sec_len + Bound_sec_len);

            /* START LOCATION RECORD 4 */
            /* ID #: */
            fout.writeShort((short) RpfFileSections.LOC_FRAME_FILE_INDEX_SUBSECTION);

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

View Full Code Here

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

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

            /* boundary rectangle record length */
            fout.writeShort((short) Bound_rec_len);

            /* For each boundary rectangle record */
 
View Full Code Here

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

            /* boundary rectangle record length */
            fout.writeShort((short) Bound_rec_len);

            /* For each boundary rectangle record */
            for (i = 0; i < groupCount; i++) {

                group = (Group) groups.elementAt(i);
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.