Package davaguine.jmac.tools

Examples of davaguine.jmac.tools.JMACException


    }

    protected void CreateHelper(File pIO, int nBytes, int nVersion) {
        //check the parameters
        if ((pIO == null) || (nBytes <= 0))
            throw new JMACException("Bad Parameter");

        //save the size
        m_nElements = nBytes / 4;
        m_nBytes = m_nElements * 4;
        m_nBits = m_nBytes * 8;
 
View Full Code Here


        } else
            pAPEInfo = new APEInfo(in);

        // fail if we couldn't get the file information
        if (pAPEInfo == null)
            throw new JMACException("Invalid Input File");
        return pAPEInfo;
    }
View Full Code Here

        } else
            pAPEInfo = new APEInfo(in);

        // fail if we couldn't get the file information
        if (pAPEInfo == null)
            throw new JMACException("Invalid Input File");

        // create and return
        IAPEDecompress pAPEDecompress = CreateIAPEDecompressCore(pAPEInfo, nStartBlock, nFinishBlock);
        return pAPEDecompress;
    }
View Full Code Here

            header.nAPEFrameDataBytesHigh = reader.readUnsignedInt();
            header.nTerminatingDataBytes = reader.readUnsignedInt();
            file.readFully(header.cFileMD5);
            return header;
        } catch (EOFException e) {
            throw new JMACException("Unsupported Format");
        }
    }
View Full Code Here

            tag.m_nSize = reader.readInt();
            tag.m_nFields = reader.readInt();
            tag.m_nFlags = reader.readInt();
            return tag;
        } catch (EOFException e) {
            throw new JMACException("Unsupported Format");
        }
    }
View Full Code Here

        } else if (nCompressionLevel == CompressionLevel.COMPRESSION_LEVEL_INSANE) {
            m_pNNFilter = new NNFilter1280(15, Globals.MAC_VERSION_NUMBER);
            m_pNNFilter1 = new NNFilter256(13, Globals.MAC_VERSION_NUMBER);
            m_pNNFilter2 = new NNFilter16(11, Globals.MAC_VERSION_NUMBER);
        } else {
            throw new JMACException("Unknown Compression Type");
        }
    }
View Full Code Here

                m_spIO.seek(m_spIO.length() - (m_spAPETag.GetTagBytes() + m_APEFileInfo.nWAVTerminatingBytes));
                byte[] pBuffer = new byte[m_APEFileInfo.nWAVTerminatingBytes];
                try {
                    m_spIO.readFully(pBuffer);
                } catch (EOFException e) {
                    throw new JMACException("Can't Read WAV Terminating Bytes");
                }

                // restore the file pointer
                m_spIO.seek(nOriginalFileLocation);
                return pBuffer;
View Full Code Here

        } else if (nCompressionLevel == CompressionLevel.COMPRESSION_LEVEL_INSANE) {
            m_pNNFilter = new NNFilter1280(15, nVersion);
            m_pNNFilter1 = new NNFilter256(13, nVersion);
            m_pNNFilter2 = new NNFilter16(11, nVersion);
        } else {
            throw new JMACException("Unknown Compression Type");
        }
    }
View Full Code Here

            header.nTerminatingBytes = reader.readUnsignedInt();
            header.nTotalFrames = reader.readUnsignedInt();
            header.nFinalFrameBlocks = reader.readUnsignedInt();
            return header;
        } catch (EOFException e) {
            throw new JMACException("Unsupported Format");
        }
    }
View Full Code Here

    public APEDecompressNative(APEInfo pAPEInfo, int nStartBlock, int nFinishBlock) {
        super(pAPEInfo, nStartBlock, nFinishBlock);
        ID = registerDecoder(this.getApeInfoIoSource(), this.getApeInfoFileVersion(), this.getApeInfoCompressionLevel(), nStartBlock, nFinishBlock, this.getApeInfoTotalBlocks(), this.getApeInfoBlockAlign(), this.getApeInfoBlocksPerFrame(), this.getApeInfoSampleRate(), this.getApeInfoBitsPerSample(), this.getApeInfoChannels());
        if (ID < 0)
            throw new JMACException("The Native APE Decoder Can't Be Instantiated");
        m_nRealFrame = 0;
    }
View Full Code Here

TOP

Related Classes of davaguine.jmac.tools.JMACException

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.