Package davaguine.jmac.tools

Examples of davaguine.jmac.tools.JMACException


    public int GetFieldSize() {
        try {
            return m_spFieldName.getBytes("US-ASCII").length + 1 + m_spFieldValue.length + 4 + 4;
        } catch (UnsupportedEncodingException e) {
            throw new JMACException("Unsupported Encoding", e);
        }
    }
View Full Code Here


public abstract class NNFilter {
    public final static int NN_WINDOW_ELEMENTS = 512;

    public NNFilter(int nOrder, int nShift, int nVersion) {
        if ((nOrder <= 0) || ((nOrder % 16) != 0))
            throw new JMACException("Wrong Order");
        m_nOrder = nOrder;
        m_nShift = nShift;
        m_nVersion = nVersion;
        m_rbInput.Create(512 /* NN_WINDOW_ELEMENTS */, nOrder);
        m_rbDeltaM.Create(512 /*NN_WINDOW_ELEMENTS */, nOrder);
View Full Code Here

            m_pNNFilter1 = null;
        } else if (nCompressionLevel == CompressionLevel.COMPRESSION_LEVEL_EXTRA_HIGH) {
            m_pNNFilter = new NNFilter256(13, nVersion);
            m_pNNFilter1 = new NNFilter32(10, nVersion);
        } else {
            throw new JMACException("Unknown Compression Type");
        }
    }
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

        // open / analyze the file
        m_spAPEInfo = pAPEInfo;

        // version check (this implementation only works with 3.92 and earlier files)
        if (getApeInfoFileVersion() > 3920)
            throw new JMACException("Wrong Version");

        // create the buffer
        m_nBlockAlign = getApeInfoBlockAlign();

        // initialize other stuff
View Full Code Here

        output.reset(pTempBuffer);
        int nBlocksDecoded = m_UnMAC.DecompressFrame(output, m_nCurrentFrame++);

        if (nBlocksDecoded == -1)
            throw new JMACException("Error While Decoding");

        int nBytesToKeep = (nBlocksDecoded * m_nBlockAlign) - nBytesToSkip;
        System.arraycopy(pTempBuffer, nBytesToSkip, m_spBuffer, m_nBufferTail, nBytesToKeep);
        m_nBufferTail += nBytesToKeep;

View Full Code Here

    }

    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

        m_nCurrentBitIndex += 8;
    }

    public void checkValue(long value) {
        if (value < 0 || value > 4294967295L)
            throw new JMACException("Wrong Value: " + value);
    }
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.