1. /*
  2. * @(#)ByteBufferAs-X-Buffer.java 1.14 03/01/23
  3. *
  4. * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. // -- This file was mechanically generated: Do not edit! -- //
  8. package java.nio;
  9. class ByteBufferAsLongBufferRL // package-private
  10. extends ByteBufferAsLongBufferL
  11. {
  12. ByteBufferAsLongBufferRL(ByteBuffer bb) { // package-private
  13. super(bb);
  14. }
  15. ByteBufferAsLongBufferRL(ByteBuffer bb,
  16. int mark, int pos, int lim, int cap,
  17. int off)
  18. {
  19. super(bb, mark, pos, lim, cap, off);
  20. }
  21. public LongBuffer slice() {
  22. int pos = this.position();
  23. int lim = this.limit();
  24. assert (pos <= lim);
  25. int rem = (pos <= lim ? lim - pos : 0);
  26. int off = (pos << 3) + offset;
  27. return new ByteBufferAsLongBufferRL(bb, -1, 0, rem, rem, off);
  28. }
  29. public LongBuffer duplicate() {
  30. return new ByteBufferAsLongBufferRL(bb,
  31. this.markValue(),
  32. this.position(),
  33. this.limit(),
  34. this.capacity(),
  35. offset);
  36. }
  37. public LongBuffer asReadOnlyBuffer() {
  38. return duplicate();
  39. }
  40. public LongBuffer put(long x) {
  41. throw new ReadOnlyBufferException();
  42. }
  43. public LongBuffer put(int i, long x) {
  44. throw new ReadOnlyBufferException();
  45. }
  46. public LongBuffer compact() {
  47. throw new ReadOnlyBufferException();
  48. }
  49. public boolean isDirect() {
  50. return bb.isDirect();
  51. }
  52. public boolean isReadOnly() {
  53. return true;
  54. }
  55. public ByteOrder order() {
  56. return ByteOrder.LITTLE_ENDIAN;
  57. }
  58. }