Package com.github.stephenc.javaisotools.sabre

Examples of com.github.stephenc.javaisotools.sabre.HandlerException


        if (filename.length() > MAX_DIRECTORY_LENGTH) {
            filename = filename.substring(0, MAX_DIRECTORY_LENGTH);
        }

        if (filename.length() == 0) {
            throw new HandlerException(getID() + ": Empty directory name encountered.");
        }

        setFilename(dir, filename);
    }
View Full Code Here


            tagLocation = BinaryTools.readUInt32AsLong(myInputStream);
            myInputStream.close();
            myInputStream = null;
        }
        catch (IOException myIOException) {
            throw new HandlerException(myIOException);
        }
        finally {
            if (myInputStream != null) {
                try {
                    myInputStream.close();
                }
                catch (IOException myIOException) {
                }
            }
        }

        ImplementationUseVolumeDescriptor myImplementationUseVolumeDescriptor = new ImplementationUseVolumeDescriptor();

        myImplementationUseVolumeDescriptor.VolumeDescriptorSequenceNumber = volumeDescriptorSequenceNumber;
        myImplementationUseVolumeDescriptor.ImplementationIdentifier.IdentifierSuffix = udfVersionIdentifierSuffix;

        try {
            myImplementationUseVolumeDescriptor.ImplementationIdentifier.setIdentifier("*UDF LV Info");
            myImplementationUseVolumeDescriptor.ImplementationUse.ImplementationID.setIdentifier(applicationIdentifier);
            myImplementationUseVolumeDescriptor.ImplementationUse.setLogicalVolumeIdentifier(imageIdentifier);
        }
        catch (Exception myException) {
            throw new HandlerException(myException);
        }

        myImplementationUseVolumeDescriptor.ImplementationUse.ImplementationID.IdentifierSuffix =
                applicationIdentifierSuffix;

View Full Code Here

        String filename = normalize(file.getFilename());
        String extension = normalize(file.getExtension());
        file.enforceDotDelimiter(FORCE_DOT_DELIMITER);

        if (filename.length() == 0 && extension.length() == 0) {
            throw new HandlerException(getID() + ": Empty file name encountered.");
        }

        if (enforces8plus3()) {
            if (filename.length() > MAX_FILENAME_LENGTH) {
                filename = filename.substring(0, MAX_FILENAME_LENGTH);
View Full Code Here

            tagLocation = BinaryTools.readUInt32AsLong(myInputStream);
            myInputStream.close();
            myInputStream = null;
        }
        catch (IOException myIOException) {
            throw new HandlerException(myIOException);
        }
        finally {
            if (myInputStream != null) {
                try {
                    myInputStream.close();
View Full Code Here

            tagLocation = BinaryTools.readUInt32AsLong(myInputStream);
            myInputStream.close();
            myInputStream = null;
        }
        catch (IOException myIOException) {
            throw new HandlerException(myIOException);
        }
        finally {
            if (myInputStream != null) {
                try {
                    myInputStream.close();
                }
                catch (IOException myIOException) {
                }
            }
        }

        LogicalVolumeIntegrityDescriptor myLogicalVolumeIntegrityDescriptor = new LogicalVolumeIntegrityDescriptor();

        myLogicalVolumeIntegrityDescriptor.RecordingDateAndTime.set(recordingTimeCalendar);
        myLogicalVolumeIntegrityDescriptor.IntegrityType = 1;
        myLogicalVolumeIntegrityDescriptor.NumberOfPartitions = sizeTable.length;

        myLogicalVolumeIntegrityDescriptor.FreeSpaceTable = freespaceTable;
        myLogicalVolumeIntegrityDescriptor.SizeTable = sizeTable;

        myLogicalVolumeIntegrityDescriptor.LogicalVolumeContensUse.UniqueID = nextUniqueId;

        myLogicalVolumeIntegrityDescriptor.LengthOfImplementationUse = 46;

        EntityID implementationId = new EntityID();

        try {
            implementationId.setIdentifier(applicationIdentifier);
            implementationId.IdentifierSuffix = applicationIdentifierSuffix;
        }
        catch (Exception myException) {
            throw new HandlerException(myException);
        }

        myLogicalVolumeIntegrityDescriptor
                .setImplementationUse(implementationId, numberOfFiles, numberOfDirectories, minimumUDFReadRevision,
                        minimumUDFWriteRevision, maximumUDFWriteRevision);
View Full Code Here

            tagLocation = BinaryTools.readUInt32AsLong(myInputStream);
            myInputStream.close();
            myInputStream = null;
        }
        catch (IOException myIOException) {
            throw new HandlerException(myIOException);
        }
        finally {
            if (myInputStream != null) {
                try {
                    myInputStream.close();
                }
                catch (IOException myIOException) {
                }
            }
        }

        FileSetDescriptor myFilesetDescriptor = new FileSetDescriptor();

        myFilesetDescriptor.RecordingDateandTime.set(recordingTimeCalendar);
        myFilesetDescriptor.InterchangeLevel = 3;
        myFilesetDescriptor.MaximumInterchangeLevel = 3;
        myFilesetDescriptor.CharacterSetList = 1;
        myFilesetDescriptor.MaximumCharacterSetList = 1;
        myFilesetDescriptor.FileSetNumber = 0;
        myFilesetDescriptor.FileSetDescriptorNumber = 0;

        myFilesetDescriptor.setLogicalVolumeIdentifier(imageIdentifier);
        myFilesetDescriptor.setFileSetIdentifier(imageIdentifier);

        myFilesetDescriptor.RootDirectoryICB.ExtentLength = blockSize;
        myFilesetDescriptor.RootDirectoryICB.ExtentLocation.part_num = partitionToStoreMetadataOn;
        myFilesetDescriptor.RootDirectoryICB.ExtentLocation.lb_num = rootDirectoryLocation;

        try {
            myFilesetDescriptor.DomainIdentifier.setIdentifier("*OSTA UDF Compliant");
        }
        catch (Exception myException) {
            throw new HandlerException(myException);
        }

        myFilesetDescriptor.DomainIdentifier.IdentifierSuffix = udfVersionIdentifierSuffix;

        /*
 
View Full Code Here

            tagLocation = BinaryTools.readUInt32AsLong(myInputStream);
            myInputStream.close();
            myInputStream = null;
        }
        catch (IOException myIOException) {
            throw new HandlerException(myIOException);
        }
        finally {
            if (myInputStream != null) {
                try {
                    myInputStream.close();
                }
                catch (IOException myIOException) {
                }
            }
        }

        FileEntry myFileEntry = new FileEntry();

        myFileEntry.DescriptorTag.TagSerialNumber = tagSerialNumber;
        myFileEntry.DescriptorTag.DescriptorVersion = descriptorVersion;
        myFileEntry.DescriptorTag.TagLocation = tagLocation;

        myFileEntry.Uid = 0xFFFFFFFF;    // TODO: get current uid and gid if java supports it
        myFileEntry.Gid = 0xFFFFFFFF;

        // TODO: get real file permission if java supports it
        myFileEntry.Permissions = Permissions.OTHER_Read | Permissions.GROUP_Read | Permissions.OWNER_Read;

        myFileEntry.FileLinkCount = fileLinkCount;

        myFileEntry.RecordFormat = 0;
        myFileEntry.RecordDisplayAttributes = 0;
        myFileEntry.RecordLength = 0;

        myFileEntry.AccessTime = new Timestamp(accessTime);
        myFileEntry.ModificationTime = new Timestamp(modificationTime);
        myFileEntry.AttributeTime = new Timestamp(attributeTime);

        myFileEntry.Checkpoint = 1;

        try {
            myFileEntry.ImplementationIdentifier.setIdentifier(applicationIdentifier);
        }
        catch (Exception myException) {
            throw new HandlerException(myException);
        }

        myFileEntry.ImplementationIdentifier.IdentifierSuffix = applicationIdentifierSuffix;

        myFileEntry.ICBTag.PriorRecordedNumberofDirectEntries = 0;
View Full Code Here

            }
            myInputStream.close();
            myInputStream = null;
        }
        catch (IOException myIOException) {
            throw new HandlerException(myIOException);
        }
        finally {
            if (myInputStream != null) {
                try {
                    myInputStream.close();
View Full Code Here

                try {
                    childFileIdentifierDescriptor.setFileIdentifier(childFileIdentifier);
                }
                catch (Exception myException) {
                    throw new HandlerException(myException);
                }

                if (childFileType == 1)    // directory
                {
                    childFileIdentifierDescriptor.FileCharacteristics = 2;
                }

                childFileIdentifierDescriptors.add(childFileIdentifierDescriptor);
            }
        }
        catch (IOException myIOException) {
            throw new HandlerException(myIOException);
        }
        finally {
            if (myInputStream != null) {
                try {
                    myInputStream.close();
View Full Code Here

            dataReferenceStack.pop();
            dataReferenceStack.pop();
            dataReferenceStack.pop();
        }
        catch (Exception myException) {
            throw new HandlerException(myException);
        }
        finally {
            if (myInputStream != null) {
                try {
                    myInputStream.close();
View Full Code Here

TOP

Related Classes of com.github.stephenc.javaisotools.sabre.HandlerException

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.