Package com.github.stephenc.javaisotools.sabre.impl

Examples of com.github.stephenc.javaisotools.sabre.impl.WordDataReference


          super.data( new ByteArrayDataReference( myUnallocatedSpaceDescriptor.getBytes( blockSize ) ) );
          */

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(7));                    // tag identifier
        super.data(new WordDataReference(tagLocation));            // tag location
        super.data(new WordDataReference(tagSerialNumber));        // tag serial number
        super.data(new WordDataReference(descriptorVersion));    // descriptor version
        super.data(new ByteArrayDataReference(myUnallocatedSpaceDescriptor.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here


          super.data( new ByteArrayDataReference( myImplementationUseVolumeDescriptor.getBytes( blockSize ) ) );
          */

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(4));                    // tag identifier
        super.data(new WordDataReference(tagLocation));            // tag location
        super.data(new WordDataReference(tagSerialNumber));        // tag serial number
        super.data(new WordDataReference(descriptorVersion));    // descriptor version
        super.data(new ByteArrayDataReference(myImplementationUseVolumeDescriptor.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

          super.data( new ByteArrayDataReference( myTerminatingDescriptor.getBytes( blockSize ) ) );
          */

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(8));                    // tag identifier
        super.data(new WordDataReference(tagLocation));            // tag location
        super.data(new WordDataReference(tagSerialNumber));        // tag serial number
        super.data(new WordDataReference(descriptorVersion));    // descriptor version
        super.data(new ByteArrayDataReference(myTerminatingDescriptor.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

          super.data( new ByteArrayDataReference( myLogicalVolumeIntegrityDescriptor.getBytes( blockSize ) ) );
          */

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(9));                    // tag identifier
        super.data(new WordDataReference(tagLocation));            // tag location
        super.data(new WordDataReference(tagSerialNumber));        // tag serial number
        super.data(new WordDataReference(descriptorVersion));    // descriptor version
        super.data(new ByteArrayDataReference(myLogicalVolumeIntegrityDescriptor.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

          super.data( new ByteArrayDataReference( myFilesetDescriptor.getBytes( blockSize ) ) );
          */

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(256));                    // tag identifier
        super.data(new WordDataReference(tagLocation));            // tag location
        super.data(new WordDataReference(tagSerialNumber));        // tag serial number
        super.data(new WordDataReference(descriptorVersion));    // descriptor version
        super.data(new ByteArrayDataReference(myFilesetDescriptor.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

          super.data( new ByteArrayDataReference( myFileEntry.getBytes( blockSize ) ) );
          */

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(261));                                                // tag identifier
        super.data(new WordDataReference(myFileEntry.DescriptorTag.TagLocation));            // tag location
        super.data(new WordDataReference(tagSerialNumber));                                    // tag serial number
        super.data(new WordDataReference(descriptorVersion));                                // descriptor version
        super.data(new ByteArrayDataReference(myFileEntry.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

               super.data( new ByteArrayDataReference( myFileEntry.getBytes( blockSize ) ) );
               */

            // without descriptor tag (handled in next pipeline section)
            super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
            super.data(new WordDataReference(261));                                                // tag identifier
            super.data(new WordDataReference(myFileEntry.DescriptorTag.TagLocation));            // tag location
            super.data(new WordDataReference(tagSerialNumber));                                    // tag serial number
            super.data(new WordDataReference(descriptorVersion));                                // descriptor version
            super.data(new ByteArrayDataReference(myFileEntry.getBytesWithoutDescriptorTag()));
            super.endElement();
        } else {
            // store as exernal file data with Short_ad
            myFileEntry.ICBTag.Flags = 0;        // storage type short_ad

            myFileEntry.LogicalBlocksRecorded = (long) (directoryFileDataLength / blockSize);
            if (directoryFileDataLength % blockSize != 0) {
                myFileEntry.LogicalBlocksRecorded++;
            }

            Short_ad allocationDescriptor = new Short_ad();

            allocationDescriptor.ExtentLength = directoryFileDataLength;
            allocationDescriptor.ExtentPosition = dataLocation;

            if (directoryFileDataLength % blockSize != 0) {
                directoryFileDataLength += blockSize - (directoryFileDataLength % blockSize);

            }
            byte[] data = new byte[directoryFileDataLength];

            long currentRealPosition = dataLocation * blockSize;
            int pos = 0;

            for (int i = 0; i < childFileIdentifierDescriptors.size(); ++i) {
                long tagLocationBlock = (long) (currentRealPosition / blockSize);

                FileIdentifierDescriptor childFileIdentifierDescriptor = childFileIdentifierDescriptors.get(i);

                childFileIdentifierDescriptor.DescriptorTag.TagLocation = tagLocationBlock;

                byte childFileIdentifierDescriptorBytes[] = childFileIdentifierDescriptors.get(i).getBytes();

                System.arraycopy(childFileIdentifierDescriptorBytes, 0, data, pos,
                        childFileIdentifierDescriptorBytes.length);
                pos += childFileIdentifierDescriptorBytes.length;

                currentRealPosition += childFileIdentifierDescriptorBytes.length;
            }

            myFileEntry.AllocationDescriptors = allocationDescriptor.getBytes();
            myFileEntry.LengthofAllocationDescriptors = myFileEntry.AllocationDescriptors.length;

            /*
               // full element with descriptor tag
               super.data( new ByteArrayDataReference( myFileEntry.getBytes( blockSize ) ) );
               */

            // without descriptor tag (handled in next pipeline section)
            super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
            super.data(new WordDataReference(261));                                                // tag identifier
            super.data(new WordDataReference(myFileEntry.DescriptorTag.TagLocation));            // tag location
            super.data(new WordDataReference(tagSerialNumber));                                    // tag serial number
            super.data(new WordDataReference(descriptorVersion));                                // descriptor version
            super.data(new ByteArrayDataReference(myFileEntry.getBytesWithoutDescriptorTag()));
            super.endElement();

            super.data(new ByteArrayDataReference(data));
        }
View Full Code Here

        // Location of Extent
        DataReference location_dr = null;
        if (type.equals(ISO9660Constants.TYPE_L_PT)) {
            location_dr = new LSBFWordDataReference(0);
        } else if (type.equals(ISO9660Constants.TYPE_M_PT)) {
            location_dr = new WordDataReference(0);
        }
        Fixup locationFixup = streamHandler.fixup(location_dr);

        // Parent Directory Number
        DataReference parent_dn = null;
View Full Code Here

            ptLocationFixup.close();
            volumeFixups.remove("typeLPTLocationFixup");
        } else if (type == ISO9660Constants.TYPE_M_PT) {
            ptFixups = typeMPTFixups;
            Fixup ptLocationFixup = (Fixup) volumeFixups.get("typeMPTLocationFixup");
            ptLocationFixup.data(new WordDataReference(location));
            ptLocationFixup.close();
            volumeFixups.remove("typeMPTLocationFixup");
        } else {
            throw new HandlerException("Unknown Path Table Type: " + type);
        }
View Full Code Here

        typeLPTDirLocation.data(new LSBFWordDataReference(location));
        typeLPTDirLocation.close();

        // Write and close Type M Path Table Fixup
        Fixup typeMPTDirLocation = (Fixup) typeMPTFixups.get(dir);
        typeMPTDirLocation.data(new WordDataReference(location));
        typeMPTDirLocation.close();
    }
View Full Code Here

TOP

Related Classes of com.github.stephenc.javaisotools.sabre.impl.WordDataReference

Copyright © 2018 www.massapicom. 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.