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

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


                               long metadataFileLocation, byte fileType)
            throws HandlerException {
        myStreamHandler.data(new DWordDataReference(recordingTimeMillis));
        myStreamHandler.data(new ByteArrayDataReference(applicationIdentifier.getBytes()));
        myStreamHandler.data(new ByteArrayDataReference(applicationIdentifierSuffix));
        myStreamHandler.data(new WordDataReference(myUDFLayoutInformation.metadataPartitionStartingBlock));
        myStreamHandler.data(new WordDataReference(myUDFLayoutInformation.metadataPartitionEndingBlock));
        myStreamHandler.data(new WordDataReference(myUDFLayoutInformation.physicalPartitionStartingBlock));
        myStreamHandler.data(new WordDataReference(metadataFileLocation));
        myStreamHandler.data(new ByteDataReference(fileType));
    }
View Full Code Here


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

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(5));                        // 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(myPartitionDescriptor.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

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

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

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

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

            myExtendedFileEntry.LogicalBlocksRecorded = (long) (directoryFileDataLength / blockSize);
            if (directoryFileDataLength % blockSize != 0) {
                myExtendedFileEntry.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;
            }

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

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

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

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

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

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

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

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(2));                    // 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(myAnchorVolumeDescriptorPointer.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

        memory.put("typeLPTLocationFixup", tlpt);
        // Optional Type L Path Table Location: none
        streamHandler.data(new LSBFWordDataReference(0));

        // Type M Path Table Location
        Fixup tmpt = streamHandler.fixup(new WordDataReference(0));
        memory.put("typeMPTLocationFixup", tmpt);
        // Optional Type M Path Table Location: none
        streamHandler.data(new WordDataReference(0));

        // Directory Record for Root Directory: 34 bytes
        doRootDR(memory);

        // Volume Set Identifier: 128 bytes
View Full Code Here

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

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(1));                    // 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(myPrimaryVolumeDescriptor.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

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

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(5));                    // 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(myPartitionDescriptor.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
View Full Code Here

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

        // without descriptor tag (handled in next pipeline section)
        super.startElement(new SabreUDFElement(SabreUDFElement.UDFElementType.DescriptorTag));
        super.data(new WordDataReference(6));                    // 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(myLogicalVolumeDescriptor.getBytesWithoutDescriptorTag()));
        super.endElement();
    }
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.