Package TCM_MPI.Buffer.Data

Examples of TCM_MPI.Buffer.Data.FragmentedData


            InsertInFinalBuffer(FROM_ID, TYPE_ID, NUMS);
           
        }else{
           
            String KEY = FROM_ID + ":" + TYPE_ID + ":" + SEQUENCE_NUMBER;
            FragmentedData FRAG;
           
            if(this._FRAG_HASHMAP.containsKey(KEY)){
               
                try{
                    FRAG = UpdateFragmentData(KEY, PACOTE_ATUAL, NUMS);
                    if(FRAG.NumberOfReceived() == FRAG.NumberOfFragments()){
                        NUMS = RemakeFragmentData(FRAG, KEY);
                        this._FINAL_BUFFER.InsertData(FROM_ID, TYPE_ID, NUMS);
                        this._FINAL_BUFFER.DisparaInfoInserted(FROM_ID + ":" + TYPE_ID);
                    }else{
                        this._FRAG_HASHMAP.put(KEY, FRAG);
View Full Code Here


     * @param PACOTE_ATUAL int - numero do pacote atual
     * @param TOTAL_PACOTES int - total de pacotes do fragmento
     * @param NUMS ByteBuffer - buffer do pacote atual
     */
    private void NewFragmentData(String KEY,int PACOTE_ATUAL,int TOTAL_PACOTES,ByteBuffer NUMS){
        FragmentedData FRAG = new FragmentedData(TOTAL_PACOTES);
        FRAG.SetByteBuffer(NUMS, (PACOTE_ATUAL - 1));
        FRAG.IncrementReceived();
        this._FRAG_HASHMAP.put(KEY, FRAG);
    }
View Full Code Here

     * @param PACOTE_ATUAL int - numero do pacote atual
     * @param NUMS ByteBuffer - buffer do pacote atual
     * @return FragmentedData - fragmento atualizado
     */
    private FragmentedData UpdateFragmentData(String KEY,int PACOTE_ATUAL,ByteBuffer NUMS){
        FragmentedData FRAG = this._FRAG_HASHMAP.get(KEY);
        //FRAG.ARR_BYTEBUFFER[PACOTE_ATUAL - 1] = NUMS;
        FRAG.SetByteBuffer(NUMS, (PACOTE_ATUAL - 1));
        NUMS = null;
        FRAG.IncrementReceived();
        return FRAG;
    }
View Full Code Here

        for(int x=0 ; x < FRAG.NumberOfFragments() ; x++){
            byte[] TEMP = FRAG.GetByteBuffer(x).array();
            NUMS.put(TEMP, 0, TEMP.length);
            FRAG.SetByteBuffer(null, x);
        }
        FragmentedData temp = this._FRAG_HASHMAP.remove(KEY);
        return NUMS;
    }
View Full Code Here

TOP

Related Classes of TCM_MPI.Buffer.Data.FragmentedData

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.