Ignore:
Timestamp:
2013-06-21T01:21:01+02:00 (12 years ago)
Author:
donvip
Message:

[josm_opendata] .7z archive read support: remove unused code

Location:
applications/editors/josm/plugins/opendata/includes/org/j7zip/Common
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/Common/CRC.java

    r29679 r29681  
    4545            _value = Table[(_value ^ data[i]) & 0xFF] ^ (_value >>> 8);
    4646    }
    47    
    48     public void Update(byte[] data) {
    49         for (int i = 0; i < data.length; i++)
    50             _value = Table[(_value ^ data[i]) & 0xFF] ^ (_value >>> 8);
    51     }
    52    
     47       
    5348    public void Update(byte[] data, int offset, int size) {
    5449        for (int i = 0; i < size; i++)
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/Common/IntVector.java

    r29679 r29681  
    4949        return elt == 0;
    5050    }
    51    
    52     public int Back() {
    53         if (elt < 1)
    54             throw new ArrayIndexOutOfBoundsException(0);
    55        
    56         return data[elt-1];
    57     }
    58    
    59     public int Front() {
    60         if (elt < 1)
    61             throw new ArrayIndexOutOfBoundsException(0);
    62        
    63         return data[0];
    64     }
    65    
    66     public void DeleteBack() {
    67         // Delete(_size - 1);
    68         remove(elt-1);
    69     }
    70    
    71     public int remove(int index) {
    72         if (index >= elt)
    73             throw new ArrayIndexOutOfBoundsException(index);
    74         int oldValue = data[index];
    75        
    76         int numMoved = elt - index - 1;
    77         if (numMoved > 0)
    78             System.arraycopy(elt, index+1, elt, index,numMoved);
    79        
    80         // data[--elt] = null; // Let gc do its work
    81        
    82         return oldValue;
    83     }
    84    
    8551}
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/Common/LimitedSequentialInStream.java

    r29679 r29681  
    55    long _size;
    66    long _pos;
    7     boolean _wasFinished;
    87   
    98    public LimitedSequentialInStream() {
     
    1716        _size = streamSize;
    1817        _pos = 0;
    19         _wasFinished = false;
    2018    }
    2119   
    2220    public int read() throws java.io.IOException {
    2321        int ret = _stream.read();
    24         if (ret == -1) _wasFinished = true;
    2522        return ret;
    2623    }
     
    3532            int realProcessedSize = _stream.read(data, off, sizeToRead);
    3633            if (realProcessedSize == -1) {
    37                 _wasFinished = true;
    3834                return -1;
    3935            }
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/Common/LockedInStream.java

    r29679 r29681  
    1212        _stream = stream;
    1313    }
    14    
    15     /* really too slow, don't use !
    16     public synchronized int read(long startPos) throws java.io.IOException
    17     {
    18         // NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
    19         _stream.Seek(startPos, IInStream.STREAM_SEEK_SET);
    20         return _stream.read();
    21     }
    22      */
    23    
    24     public synchronized int read(long startPos, byte  [] data, int size) throws java.io.IOException {
    25         // NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
    26         _stream.Seek(startPos, IInStream.STREAM_SEEK_SET);
    27         return _stream.read(data,0, size);
    28     }
    29    
     14       
    3015    public synchronized int read(long startPos, byte  [] data, int off, int size) throws java.io.IOException {
    3116        // NWindows::NSynchronization::CCriticalSectionLock lock(_criticalSection);
  • applications/editors/josm/plugins/opendata/includes/org/j7zip/Common/RecordVector.java

    r29679 r29681  
    1414        return get(elementCount-1);
    1515    }
    16    
    17     public E Front() {
    18         return get(0);
    19     }
    20    
    21     public void DeleteBack() {
    22         remove(elementCount-1);
    23     }
    2416}
Note: See TracChangeset for help on using the changeset viewer.