Revision 11351 trunk/libraries/libRaster/src/org/gvsig/raster/buffer/cache/RasterReadOnlyHugeBuffer.java
RasterReadOnlyHugeBuffer.java | ||
---|---|---|
97 | 97 |
|
98 | 98 |
//********************************************************* |
99 | 99 |
|
100 |
public void setLineByte(byte[][] data, int line) { |
|
101 |
try { |
|
102 |
lru.cacheAccess(line, false); |
|
103 |
} catch (InvalidPageNumberException e) {return;} |
|
104 |
cache.getAccessPage().setLineByte(data, (line & cache.getOffset())); |
|
105 |
} |
|
100 |
public void setLineByte(byte[][] data, int line) {} |
|
106 | 101 |
|
107 |
public void setLineShort(short[][] data, int line) { |
|
108 |
try { |
|
109 |
lru.cacheAccess(line, false); |
|
110 |
} catch (InvalidPageNumberException e) {return;} |
|
111 |
cache.getAccessPage().setLineShort(data, (line & cache.getOffset())); |
|
112 |
} |
|
102 |
public void setLineShort(short[][] data, int line) {} |
|
113 | 103 |
|
114 |
public void setLineInt(int[][] data, int line) { |
|
115 |
try { |
|
116 |
lru.cacheAccess(line, false); |
|
117 |
} catch (InvalidPageNumberException e) {return;} |
|
118 |
cache.getAccessPage().setLineInt(data, (line & cache.getOffset())); |
|
119 |
} |
|
104 |
public void setLineInt(int[][] data, int line) {} |
|
120 | 105 |
|
121 |
public void setLineFloat(float[][] data, int line) { |
|
122 |
try { |
|
123 |
lru.cacheAccess(line, false); |
|
124 |
} catch (InvalidPageNumberException e) {return;} |
|
125 |
cache.getAccessPage().setLineFloat(data, (line & cache.getOffset())); |
|
126 |
} |
|
106 |
public void setLineFloat(float[][] data, int line) {} |
|
127 | 107 |
|
128 |
public void setLineDouble(double[][] data, int line) { |
|
129 |
try { |
|
130 |
lru.cacheAccess(line, false); |
|
131 |
} catch (InvalidPageNumberException e) {return;} |
|
132 |
cache.getAccessPage().setLineDouble(data, (line & cache.getOffset())); |
|
133 |
} |
|
108 |
public void setLineDouble(double[][] data, int line) {} |
|
134 | 109 |
|
135 | 110 |
//********************************************************* |
136 | 111 |
|
... | ... | |
171 | 146 |
|
172 | 147 |
//********************************************************* |
173 | 148 |
|
174 |
public void setLineInBandByte(byte[] data, int line, int band) { |
|
175 |
try { |
|
176 |
lru.cacheAccess(line, false); |
|
177 |
} catch (InvalidPageNumberException e) {return;} |
|
178 |
cache.getAccessPage().setLineInBandByte(data, (line & cache.getOffset()), band); |
|
179 |
} |
|
149 |
public void setLineInBandByte(byte[] data, int line, int band) {} |
|
180 | 150 |
|
181 |
public void setLineInBandShort(short[] data, int line, int band) { |
|
182 |
try { |
|
183 |
lru.cacheAccess(line, false); |
|
184 |
} catch (InvalidPageNumberException e) {return;} |
|
185 |
cache.getAccessPage().setLineInBandShort(data, (line & cache.getOffset()), band); |
|
186 |
} |
|
151 |
public void setLineInBandShort(short[] data, int line, int band) {} |
|
187 | 152 |
|
188 |
public void setLineInBandInt(int[] data, int line, int band) { |
|
189 |
try { |
|
190 |
lru.cacheAccess(line, false); |
|
191 |
} catch (InvalidPageNumberException e) {return;} |
|
192 |
cache.getAccessPage().setLineInBandInt(data, (line & cache.getOffset()), band); |
|
193 |
} |
|
153 |
public void setLineInBandInt(int[] data, int line, int band) {} |
|
194 | 154 |
|
195 |
public void setLineInBandFloat(float[] data, int line, int band) { |
|
196 |
try { |
|
197 |
lru.cacheAccess(line, false); |
|
198 |
} catch (InvalidPageNumberException e) {return;} |
|
199 |
cache.getAccessPage().setLineInBandFloat(data, (line & cache.getOffset()), band); |
|
200 |
} |
|
155 |
public void setLineInBandFloat(float[] data, int line, int band) {} |
|
201 | 156 |
|
202 |
public void setLineInBandDouble(double[] data, int line, int band) { |
|
203 |
try { |
|
204 |
lru.cacheAccess(line, false); |
|
205 |
} catch (InvalidPageNumberException e) {return;} |
|
206 |
cache.getAccessPage().setLineInBandDouble(data, (line & cache.getOffset()), band); |
|
207 |
} |
|
157 |
public void setLineInBandDouble(double[] data, int line, int band) {} |
|
208 | 158 |
|
209 | 159 |
//********************************************************* |
210 | 160 |
|
... | ... | |
255 | 205 |
|
256 | 206 |
//********************************************************* |
257 | 207 |
|
258 |
public void setElem(int line, int col, int band, byte data) { |
|
259 |
try { |
|
260 |
lru.cacheAccess(line, false); |
|
261 |
} catch (InvalidPageNumberException e) { return;} |
|
262 |
cache.getAccessPage().setElem((line & cache.getOffset()), col, band, data); |
|
263 |
} |
|
208 |
public void setElem(int line, int col, int band, byte data) {} |
|
264 | 209 |
|
265 |
public void setElem(int line, int col, int band, short data) { |
|
266 |
try { |
|
267 |
lru.cacheAccess(line, false); |
|
268 |
} catch (InvalidPageNumberException e) {return;} |
|
269 |
cache.getAccessPage().setElem((line & cache.getOffset()), col, band, data); |
|
270 |
} |
|
210 |
public void setElem(int line, int col, int band, short data) {} |
|
271 | 211 |
|
272 |
public void setElem(int line, int col, int band, int data) { |
|
273 |
try { |
|
274 |
lru.cacheAccess(line, false); |
|
275 |
} catch (InvalidPageNumberException e) {return;} |
|
276 |
cache.getAccessPage().setElem((line & cache.getOffset()), col, band, data); |
|
277 |
} |
|
212 |
public void setElem(int line, int col, int band, int data) {} |
|
278 | 213 |
|
279 |
public void setElem(int line, int col, int band, float data) { |
|
280 |
try { |
|
281 |
lru.cacheAccess(line, false); |
|
282 |
} catch (InvalidPageNumberException e) {return;} |
|
283 |
cache.getAccessPage().setElem((line & cache.getOffset()), col, band, data); |
|
284 |
} |
|
214 |
public void setElem(int line, int col, int band, float data) {} |
|
285 | 215 |
|
286 |
public void setElem(int line, int col, int band, double data) { |
|
287 |
try { |
|
288 |
lru.cacheAccess(line, false); |
|
289 |
} catch (InvalidPageNumberException e) {return;} |
|
290 |
cache.getAccessPage().setElem((line & cache.getOffset()), col, band, data); |
|
291 |
} |
|
216 |
public void setElem(int line, int col, int band, double data) {} |
|
292 | 217 |
|
293 | 218 |
//********************************************************* |
294 | 219 |
|
... | ... | |
344 | 269 |
|
345 | 270 |
//********************************************************* |
346 | 271 |
|
347 |
public void setElemByte(int line, int col, byte[] data) { |
|
348 |
try { |
|
349 |
lru.cacheAccess(line, false); |
|
350 |
} catch (InvalidPageNumberException e) {return;} |
|
351 |
cache.getAccessPage().setElemByte((line & cache.getOffset()), col, data); |
|
352 |
} |
|
272 |
public void setElemByte(int line, int col, byte[] data) {} |
|
353 | 273 |
|
354 |
public void setElemShort(int line, int col, short[] data) { |
|
355 |
try { |
|
356 |
lru.cacheAccess(line, false); |
|
357 |
} catch (InvalidPageNumberException e) {return;} |
|
358 |
cache.getAccessPage().setElemShort((line & cache.getOffset()), col, data); |
|
359 |
} |
|
274 |
public void setElemShort(int line, int col, short[] data) {} |
|
360 | 275 |
|
361 |
public void setElemInt(int line, int col, int[] data) { |
|
362 |
try { |
|
363 |
lru.cacheAccess(line, false); |
|
364 |
} catch (InvalidPageNumberException e) {return;} |
|
365 |
cache.getAccessPage().setElemInt((line & cache.getOffset()), col, data); |
|
366 |
} |
|
276 |
public void setElemInt(int line, int col, int[] data) {} |
|
367 | 277 |
|
368 |
public void setElemFloat(int line, int col, float[] data) { |
|
369 |
try { |
|
370 |
lru.cacheAccess(line, false); |
|
371 |
} catch (InvalidPageNumberException e) {return;} |
|
372 |
cache.getAccessPage().setElemFloat((line & cache.getOffset()), col, data); |
|
373 |
} |
|
278 |
public void setElemFloat(int line, int col, float[] data) {} |
|
374 | 279 |
|
375 |
public void setElemDouble(int line, int col, double[] data) { |
|
376 |
try { |
|
377 |
lru.cacheAccess(line, false); |
|
378 |
} catch (InvalidPageNumberException e) {return;} |
|
379 |
cache.getAccessPage().setElemDouble((line & cache.getOffset()), col, data); |
|
380 |
} |
|
280 |
public void setElemDouble(int line, int col, double[] data) {} |
|
381 | 281 |
|
382 |
//TODO: FUNCIONALIDAD: Terminar m?todos de RasterCach? |
|
383 |
|
|
384 | 282 |
//*********************************************** |
385 | 283 |
//Obtiene una banda entera |
386 | 284 |
|
... | ... | |
396 | 294 |
return null; |
397 | 295 |
} |
398 | 296 |
|
399 |
/* |
|
400 |
* (non-Javadoc) |
|
401 |
* @see org.gvsig.fmap.driver.IBuffer#replicateBand(int, int) |
|
402 |
*/ |
|
403 | 297 |
public void replicateBand(int orig, int dest) { |
404 | 298 |
} |
405 | 299 |
|
... | ... | |
435 | 329 |
|
436 | 330 |
//********************************************************* |
437 | 331 |
|
438 |
public void assign(int band, byte value) { |
|
439 |
for(int line = 0; line < height; line ++){ |
|
440 |
boolean beginLine = true; //Para acelerar solo comprobar? si la p?gina est? en cach? cada vez que empieza una l?nea |
|
441 |
for(int col = 0; col < width; col ++){ |
|
442 |
try { |
|
443 |
if(beginLine){ |
|
444 |
lru.cacheAccess(line, false); |
|
445 |
beginLine = false; |
|
446 |
} |
|
447 |
} catch (InvalidPageNumberException e) {return;} |
|
448 |
cache.getAccessPage().setElem((line & cache.getOffset()), col, band, value); |
|
449 |
} |
|
450 |
} |
|
451 |
} |
|
332 |
public void assign(int band, byte value) {} |
|
452 | 333 |
|
453 |
public void assign(int band, short value) { |
|
454 |
for(int line = 0; line < height; line ++){ |
|
455 |
boolean beginLine = true; //Para acelerar solo comprobar? si la p?gina est? en cach? cada vez que empieza una l?nea |
|
456 |
for(int col = 0; col < width; col ++){ |
|
457 |
try { |
|
458 |
if(beginLine){ |
|
459 |
lru.cacheAccess(line, false); |
|
460 |
beginLine = false; |
|
461 |
} |
|
462 |
} catch (InvalidPageNumberException e) {return;} |
|
463 |
cache.getAccessPage().setElem((line & cache.getOffset()), col, band, value); |
|
464 |
} |
|
465 |
} |
|
466 |
} |
|
334 |
public void assign(int band, short value) {} |
|
467 | 335 |
|
468 |
public void assign(int band, int value) { |
|
469 |
for(int line = 0; line < height; line ++){ |
|
470 |
boolean beginLine = true; //Para acelerar solo comprobar? si la p?gina est? en cach? cada vez que empieza una l?nea |
|
471 |
for(int col = 0; col < width; col ++){ |
|
472 |
try { |
|
473 |
if(beginLine){ |
|
474 |
lru.cacheAccess(line, false); |
|
475 |
beginLine = false; |
|
476 |
} |
|
477 |
} catch (InvalidPageNumberException e) {return;} |
|
478 |
cache.getAccessPage().setElem((line & cache.getOffset()), col, band, value); |
|
479 |
} |
|
480 |
} |
|
481 |
} |
|
336 |
public void assign(int band, int value) {} |
|
482 | 337 |
|
483 |
public void assign(int band, float value) { |
|
484 |
for(int line = 0; line < height; line ++){ |
|
485 |
boolean beginLine = true; //Para acelerar solo comprobar? si la p?gina est? en cach? cada vez que empieza una l?nea |
|
486 |
for(int col = 0; col < width; col ++){ |
|
487 |
try { |
|
488 |
if(beginLine){ |
|
489 |
lru.cacheAccess(line, false); |
|
490 |
beginLine = false; |
|
491 |
} |
|
492 |
} catch (InvalidPageNumberException e) {return;} |
|
493 |
cache.getAccessPage().setElem((line & cache.getOffset()), col, band, value); |
|
494 |
} |
|
495 |
} |
|
496 |
} |
|
338 |
public void assign(int band, float value) {} |
|
497 | 339 |
|
498 |
public void assign(int band, double value) { |
|
499 |
for(int line = 0; line < height; line ++){ |
|
500 |
boolean beginLine = true; //Para acelerar solo comprobar? si la p?gina est? en cach? cada vez que empieza una l?nea |
|
501 |
for(int col = 0; col < width; col ++){ |
|
502 |
try { |
|
503 |
if(beginLine){ |
|
504 |
lru.cacheAccess(line, false); |
|
505 |
beginLine = false; |
|
506 |
} |
|
507 |
} catch (InvalidPageNumberException e) {return;} |
|
508 |
cache.getAccessPage().setElem((line & cache.getOffset()), col, band, value); |
|
509 |
} |
|
510 |
} |
|
511 |
} |
|
340 |
public void assign(int band, double value) {} |
|
341 |
|
|
512 | 342 |
|
513 | 343 |
/* |
514 | 344 |
* (non-Javadoc) |
Also available in: Unified diff