public inbox for frysk-cvs@sourceware.org
help / color / mirror / Atom feed
* [SCM] master: frysk-sys/inua/ChangeLog
@ 2008-07-04 16:19 cagney
0 siblings, 0 replies; only message in thread
From: cagney @ 2008-07-04 16:19 UTC (permalink / raw)
To: frysk-cvs
The branch, master has been updated
via 6a0ea520d3eaebb371820f312c3bb40666c60265 (commit)
from fbcdfd6bd19693304caf613b79fd1d69fa1eca67 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email.
- Log -----------------------------------------------------------------
commit 6a0ea520d3eaebb371820f312c3bb40666c60265
Author: Andrew Cagney <cagney@redhat.com>
Date: Fri Jul 4 11:24:41 2008 -0400
frysk-sys/inua/ChangeLog
2008-07-04 Andrew Cagney <cagney@redhat.com>
* eio/ByteBuffer.java: Throw InternalException.
* eio/BufferUnderflowException.java: Extend UserException.
-----------------------------------------------------------------------
Summary of changes:
frysk-sys/inua/ChangeLog | 5 ++
frysk-sys/inua/eio/BufferUnderflowException.java | 10 ++-
frysk-sys/inua/eio/ByteBuffer.java | 74 ++++++++++------------
3 files changed, 45 insertions(+), 44 deletions(-)
First 500 lines of diff:
diff --git a/frysk-sys/inua/ChangeLog b/frysk-sys/inua/ChangeLog
index 1827bf2..16ae59b 100644
--- a/frysk-sys/inua/ChangeLog
+++ b/frysk-sys/inua/ChangeLog
@@ -1,3 +1,8 @@
+2008-07-04 Andrew Cagney <cagney@redhat.com>
+
+ * eio/ByteBuffer.java: Throw InternalException.
+ * eio/BufferUnderflowException.java: Extend UserException.
+
2008-06-05 Andrew Cagney <cagney@redhat.com>
* eio/ByteBuffer.java: Add missing indexed word get/put methods.
diff --git a/frysk-sys/inua/eio/BufferUnderflowException.java b/frysk-sys/inua/eio/BufferUnderflowException.java
index a17063d..2f9f7ed 100644
--- a/frysk-sys/inua/eio/BufferUnderflowException.java
+++ b/frysk-sys/inua/eio/BufferUnderflowException.java
@@ -34,10 +34,14 @@
// modification, you must delete this exception statement from your
// version and license this file solely under the GPL without
// exception.
+
package inua.eio;
-public class BufferUnderflowException
- extends java.nio.BufferUnderflowException
-{
+import frysk.UserException;
+
+public class BufferUnderflowException extends UserException {
private static final long serialVersionUID = 1L;
+ BufferUnderflowException(long address) {
+ super("Address 0x" + Long.toHexString(address) + " out of bounds");
+ }
}
diff --git a/frysk-sys/inua/eio/ByteBuffer.java b/frysk-sys/inua/eio/ByteBuffer.java
index 6549a58..873e481 100644
--- a/frysk-sys/inua/eio/ByteBuffer.java
+++ b/frysk-sys/inua/eio/ByteBuffer.java
@@ -40,9 +40,10 @@
* A ByteBuffer. Just like {@link java.nio.ByteBuffer} only 64-bit.
*/
-
package inua.eio;
+import frysk.InternalException;
+
public abstract class ByteBuffer
extends Buffer
{
@@ -293,9 +294,8 @@ public abstract class ByteBuffer
* Given BUFFER, return a new subBuffer. Used by {@link #slice}.
*/
protected ByteBuffer subBuffer (ByteBuffer buffer, long lowerExtreem,
- long upperExtreem)
- {
- throw new RuntimeException("not implemented");
+ long upperExtreem) {
+ throw new InternalException("not implemented");
}
public ByteBuffer slice (long off, long len)
@@ -321,14 +321,12 @@ public abstract class ByteBuffer
return (byte) peek(lowWater + index);
}
- public ByteBuffer get (long index, byte[] dst, int off, int len)
- throws BufferUnderflowException
- {
- if (ULong.GT(index + len, limit()))
- throw new BufferUnderflowException();
- peekFully(lowWater + index,dst,off,len);
- return this;
- }
+ public ByteBuffer get(long index, byte[] dst, int off, int len) {
+ if (ULong.GT(index + len, limit()))
+ throw new BufferUnderflowException(index + len);
+ peekFully(lowWater + index,dst,off,len);
+ return this;
+ }
public int safeGet (long index, byte[] dst, int off, int len)
{
@@ -339,35 +337,29 @@ public abstract class ByteBuffer
return maxLen;
}
- public ByteBuffer get (byte[] dst, int off, int len)
- throws BufferUnderflowException
- {
- if (ULong.GT(len, remaining()))
- throw new BufferUnderflowException();
- peek(cursor, dst, off, len);
- cursor += len;
- return this;
- }
+ public ByteBuffer get(byte[] dst, int off, int len) {
+ if (ULong.GT(len, remaining()))
+ throw new BufferUnderflowException(len);
+ peek(cursor, dst, off, len);
+ cursor += len;
+ return this;
+ }
- public final ByteBuffer get (byte[] dst) throws BufferUnderflowException
- {
- return get(dst, 0, dst.length);
- }
+ public final ByteBuffer get (byte[] dst) {
+ return get(dst, 0, dst.length);
+ }
- public ByteBuffer put (byte[] src, int off, int len)
- throws BufferUnderflowException
- {
- if (ULong.GT(len, remaining()))
- throw new BufferUnderflowException();
- poke(cursor, src, off, len);
- cursor += len;
- return this;
- }
+ public ByteBuffer put (byte[] src, int off, int len) {
+ if (ULong.GT(len, remaining()))
+ throw new BufferUnderflowException(len);
+ poke(cursor, src, off, len);
+ cursor += len;
+ return this;
+ }
- public final ByteBuffer put (byte[] src) throws BufferUnderflowException
- {
- return put(src, 0, src.length);
- }
+ public final ByteBuffer put (byte[] src) {
+ return put(src, 0, src.length);
+ }
protected ByteOrdered byteOrdered;
hooks/post-receive
--
frysk system monitor/debugger
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-07-04 16:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-04 16:19 [SCM] master: frysk-sys/inua/ChangeLog cagney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).