I was wondering what is the quickest way of storing a byte[] with an integer index in java without using Maps, TreeMap, ArrayLists etc.
i.e. not like this:
private Map<Integer, by开发者_如何学JAVAte[]> example = new TreeMap()
private byte[][] example;
example = new byte[][ARRAYS_COUNT];
example[0] = new byte[10];
example[1] = new byte[20];
...
Quickest way would be an ArrayList<byte[]>, or you want or not. A byte[][] isn't going to work as you can then hold only 28-1 arrays, not 232-1 as you could with an integer index which you explicitly mentioned in your question.
How about byte[][] and resize as appropriate? Not as good as an ArrayList but you banned that...
加载中,请稍侯......
精彩评论