331 |
*/ |
*/ |
332 |
public abstract byte get (); |
public abstract byte get (); |
333 |
|
|
334 |
|
/** |
335 |
|
* Relative put method. |
336 |
|
* |
337 |
|
* @exception BufferOverflowException If this buffer's current position is |
338 |
|
* not smaller than its limit. |
339 |
|
* @exception ReadOnlyBufferException If this buffer is read-only. |
340 |
|
*/ |
341 |
public abstract ByteBuffer put (byte b); |
public abstract ByteBuffer put (byte b); |
342 |
|
|
343 |
|
/** |
344 |
|
* Absolute get method. |
345 |
|
* |
346 |
|
* @exception IndexOutOfBoundsException FIXME |
347 |
|
*/ |
348 |
public abstract byte get (int index); |
public abstract byte get (int index); |
349 |
|
|
350 |
|
/** |
351 |
|
* Absolute put method. |
352 |
|
* |
353 |
|
* @exception ReadOnlyBufferException If this buffer is read-only |
354 |
|
* @exception IndexOutOfBoundsException FIXME |
355 |
|
*/ |
356 |
public abstract ByteBuffer put (int index, byte b); |
public abstract ByteBuffer put (int index, byte b); |
357 |
|
|
358 |
|
/** |
359 |
|
* Compacts this buffer. |
360 |
|
* |
361 |
|
* @exception ReadOnlyBufferException If this buffer is read-only |
362 |
|
*/ |
363 |
public abstract ByteBuffer compact(); |
public abstract ByteBuffer compact(); |
364 |
|
|
365 |
|
/** |
366 |
|
* Tells whether or not this buffer is direct. |
367 |
|
*/ |
368 |
public abstract boolean isDirect(); |
public abstract boolean isDirect(); |
369 |
|
|
370 |
|
/** |
371 |
|
* Creates a new byte buffer whose content is a shared subsequence of this |
372 |
|
* buffer's content. |
373 |
|
*/ |
374 |
public abstract ByteBuffer slice(); |
public abstract ByteBuffer slice(); |
375 |
|
|
376 |
|
/** |
377 |
|
* Creates a new byte buffer that shares this buffer's content. |
378 |
|
*/ |
379 |
public abstract ByteBuffer duplicate(); |
public abstract ByteBuffer duplicate(); |
380 |
|
|
381 |
|
/** |
382 |
|
* Creates a new, read-only byte buffer that shares this buffer's content. |
383 |
|
*/ |
384 |
public abstract ByteBuffer asReadOnlyBuffer(); |
public abstract ByteBuffer asReadOnlyBuffer(); |
385 |
|
|
386 |
|
/** |
387 |
|
* Creates a view of this byte buffer as a short buffer. |
388 |
|
*/ |
389 |
public abstract ShortBuffer asShortBuffer(); |
public abstract ShortBuffer asShortBuffer(); |
390 |
|
|
391 |
|
/** |
392 |
|
* Creates a view of this byte buffer as a char buffer. |
393 |
|
*/ |
394 |
public abstract CharBuffer asCharBuffer(); |
public abstract CharBuffer asCharBuffer(); |
395 |
|
|
396 |
|
/** |
397 |
|
* Creates a view of this byte buffer as an integer buffer. |
398 |
|
*/ |
399 |
public abstract IntBuffer asIntBuffer(); |
public abstract IntBuffer asIntBuffer(); |
400 |
|
|
401 |
|
/** |
402 |
|
* Creates a view of this byte buffer as a long buffer. |
403 |
|
*/ |
404 |
public abstract LongBuffer asLongBuffer(); |
public abstract LongBuffer asLongBuffer(); |
405 |
|
|
406 |
|
/** |
407 |
|
* Creates a view of this byte buffer as a float buffer. |
408 |
|
*/ |
409 |
public abstract FloatBuffer asFloatBuffer(); |
public abstract FloatBuffer asFloatBuffer(); |
410 |
|
|
411 |
|
/** |
412 |
|
* Creates a view of this byte buffer as a double buffer. |
413 |
|
*/ |
414 |
public abstract DoubleBuffer asDoubleBuffer(); |
public abstract DoubleBuffer asDoubleBuffer(); |
415 |
|
|
416 |
|
/** |
417 |
|
* Relative get method for reading a character value. |
418 |
|
* |
419 |
|
* @exception BufferUnderflowException If there are fewer than two bytes |
420 |
|
* remaining in this buffer. |
421 |
|
*/ |
422 |
public abstract char getChar(); |
public abstract char getChar(); |
423 |
|
|
424 |
|
/** |
425 |
|
* Relative put method for writing a character value. |
426 |
|
* |
427 |
|
* @exception BufferOverflowException If this buffer's current position is |
428 |
|
* not smaller than its limit. |
429 |
|
*/ |
430 |
public abstract ByteBuffer putChar(char value); |
public abstract ByteBuffer putChar(char value); |
431 |
|
|
432 |
|
/** |
433 |
|
* Absolute get method for reading a character value. |
434 |
|
* |
435 |
|
* @exception IndexOutOfBoundsException If there are fewer than two bytes |
436 |
|
* remaining in this buffer |
437 |
|
*/ |
438 |
public abstract char getChar(int index); |
public abstract char getChar(int index); |
439 |
|
|
440 |
|
/** |
441 |
|
* Absolute put method for writing a character value. |
442 |
|
* |
443 |
|
* @exception IndexOutOfBoundsException If index is negative or not smaller |
444 |
|
* than the buffer's limit, minus one. |
445 |
|
*/ |
446 |
public abstract ByteBuffer putChar(int index, char value); |
public abstract ByteBuffer putChar(int index, char value); |
447 |
|
|
448 |
|
/** |
449 |
|
* Relative get method for reading a short value. |
450 |
|
* |
451 |
|
* @exception BufferUnderflowException If index is negative or not smaller |
452 |
|
* than the buffer's limit, minus one. |
453 |
|
*/ |
454 |
public abstract short getShort(); |
public abstract short getShort(); |
455 |
|
|
456 |
|
/** |
457 |
|
* Relative put method for writing a short value. |
458 |
|
* |
459 |
|
* @exception BufferOverflowException If this buffer's current position is |
460 |
|
* not smaller than its limit. |
461 |
|
*/ |
462 |
public abstract ByteBuffer putShort(short value); |
public abstract ByteBuffer putShort(short value); |
463 |
|
|
464 |
|
/** |
465 |
|
* Absolute get method for reading a short value. |
466 |
|
* |
467 |
|
* @exception IndexOutOfBoundsException If there are fewer than two bytes |
468 |
|
* remaining in this buffer |
469 |
|
*/ |
470 |
public abstract short getShort(int index); |
public abstract short getShort(int index); |
471 |
|
|
472 |
|
/** |
473 |
|
* Absolute put method for writing a short value. |
474 |
|
* |
475 |
|
* @exception IndexOutOfBoundsException If index is negative or not smaller |
476 |
|
* than the buffer's limit, minus one. |
477 |
|
*/ |
478 |
public abstract ByteBuffer putShort(int index, short value); |
public abstract ByteBuffer putShort(int index, short value); |
479 |
|
|
480 |
|
/** |
481 |
|
* Relative get method for reading an integer value. |
482 |
|
* |
483 |
|
* @exception BufferUnderflowException If there are fewer than four bytes |
484 |
|
* remaining in this buffer. |
485 |
|
*/ |
486 |
public abstract int getInt(); |
public abstract int getInt(); |
487 |
|
|
488 |
|
/** |
489 |
|
* Relative put method for writing an integer value. |
490 |
|
* |
491 |
|
* @exception BufferOverflowException If this buffer's current position is |
492 |
|
* not smaller than its limit. |
493 |
|
*/ |
494 |
public abstract ByteBuffer putInt(int value); |
public abstract ByteBuffer putInt(int value); |
495 |
|
|
496 |
|
/** |
497 |
|
* Absolute get method for reading an integer value. |
498 |
|
* |
499 |
|
* @exception IndexOutOfBoundsException If index is negative or not smaller |
500 |
|
* than the buffer's limit, minus three. |
501 |
|
*/ |
502 |
public abstract int getInt(int index); |
public abstract int getInt(int index); |
503 |
|
|
504 |
|
/** |
505 |
|
* Absolute put method for writing an integer value. |
506 |
|
* |
507 |
|
* @exception IndexOutOfBoundsException If index is negative or not smaller |
508 |
|
* than the buffer's limit, minus three. |
509 |
|
*/ |
510 |
public abstract ByteBuffer putInt(int index, int value); |
public abstract ByteBuffer putInt(int index, int value); |
511 |
|
|
512 |
|
/** |
513 |
|
* Relative get method for reading a long value. |
514 |
|
* |
515 |
|
* @exception BufferUnderflowException If there are fewer than eight bytes |
516 |
|
* remaining in this buffer. |
517 |
|
*/ |
518 |
public abstract long getLong(); |
public abstract long getLong(); |
519 |
|
|
520 |
|
/** |
521 |
|
* Relative put method for writing a long value. |
522 |
|
* |
523 |
|
* @exception BufferOverflowException If this buffer's current position is |
524 |
|
* not smaller than its limit. |
525 |
|
*/ |
526 |
public abstract ByteBuffer putLong(long value); |
public abstract ByteBuffer putLong(long value); |
527 |
|
|
528 |
|
/** |
529 |
|
* Absolute get method for reading a long value. |
530 |
|
* |
531 |
|
* @exception IndexOutOfBoundsException If index is negative or not smaller |
532 |
|
* than the buffer's limit, minus seven. |
533 |
|
*/ |
534 |
public abstract long getLong(int index); |
public abstract long getLong(int index); |
535 |
|
|
536 |
|
/** |
537 |
|
* Absolute put method for writing a float value. |
538 |
|
* |
539 |
|
* @exception IndexOutOfBoundsException If index is negative or not smaller |
540 |
|
* than the buffer's limit, minus seven. |
541 |
|
*/ |
542 |
public abstract ByteBuffer putLong(int index, long value); |
public abstract ByteBuffer putLong(int index, long value); |
543 |
|
|
544 |
|
/** |
545 |
|
* Relative get method for reading a float value. |
546 |
|
* |
547 |
|
* @exception BufferUnderflowException If there are fewer than four bytes |
548 |
|
* remaining in this buffer. |
549 |
|
*/ |
550 |
public abstract float getFloat(); |
public abstract float getFloat(); |
551 |
|
|
552 |
|
/** |
553 |
|
* Relative put method for writing a float value. |
554 |
|
* |
555 |
|
* @exception BufferOverflowException If there are fewer than four bytes |
556 |
|
* remaining in this buffer. |
557 |
|
*/ |
558 |
public abstract ByteBuffer putFloat(float value); |
public abstract ByteBuffer putFloat(float value); |
559 |
|
|
560 |
|
/** |
561 |
|
* Absolute get method for reading a float value. |
562 |
|
* |
563 |
|
* @exception IndexOutOfBoundsException If index is negative or not smaller |
564 |
|
* than the buffer's limit, minus three. |
565 |
|
*/ |
566 |
public abstract float getFloat(int index); |
public abstract float getFloat(int index); |
567 |
|
|
568 |
|
/** |
569 |
|
* Relative put method for writing a float value. |
570 |
|
* |
571 |
|
* @exception IndexOutOfBoundsException If index is negative or not smaller |
572 |
|
* than the buffer's limit, minus three. |
573 |
|
*/ |
574 |
public abstract ByteBuffer putFloat(int index, float value); |
public abstract ByteBuffer putFloat(int index, float value); |
575 |
|
|
576 |
|
/** |
577 |
|
* Relative get method for reading a double value. |
578 |
|
* |
579 |
|
* @exception BufferUnderflowException If there are fewer than eight bytes |
580 |
|
* remaining in this buffer. |
581 |
|
*/ |
582 |
public abstract double getDouble(); |
public abstract double getDouble(); |
583 |
|
|
584 |
|
/** |
585 |
|
* Relative put method for writing a double value. |
586 |
|
* |
587 |
|
* @exception BufferOverflowException If this buffer's current position is |
588 |
|
* not smaller than its limit. |
589 |
|
*/ |
590 |
public abstract ByteBuffer putDouble(double value); |
public abstract ByteBuffer putDouble(double value); |
591 |
|
|
592 |
|
/** |
593 |
|
* Absolute get method for reading a double value. |
594 |
|
* |
595 |
|
* @exception IndexOutOfBoundsException If index is negative or not smaller |
596 |
|
* than the buffer's limit, minus seven. |
597 |
|
*/ |
598 |
public abstract double getDouble(int index); |
public abstract double getDouble(int index); |
599 |
|
|
600 |
|
/** |
601 |
|
* Absolute put method for writing a double value. |
602 |
|
* |
603 |
|
* @exception IndexOutOfBoundsException If index is negative or not smaller |
604 |
|
* than the buffer's limit, minus seven. |
605 |
|
*/ |
606 |
public abstract ByteBuffer putDouble(int index, double value); |
public abstract ByteBuffer putDouble(int index, double value); |
607 |
|
|
608 |
|
/** |
609 |
|
* Returns a string summarizing the state of this buffer. |
610 |
|
*/ |
611 |
|
public String toString () |
612 |
|
{ |
613 |
|
return ""; |
614 |
|
} |
615 |
} |
} |