Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Unified Diff: tools/servicec/lib/src/resources/java/fletch/Segment.java

Issue 1659163007: Rename fletch -> dartino (Closed) Base URL: https://github.com/dartino/sdk.git@master
Patch Set: address comments Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/servicec/lib/src/resources/java/fletch/Reader.java ('k') | tools/spawn_vm_and_attach.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/servicec/lib/src/resources/java/fletch/Segment.java
diff --git a/tools/servicec/lib/src/resources/java/fletch/Segment.java b/tools/servicec/lib/src/resources/java/fletch/Segment.java
deleted file mode 100644
index 6f217086dd1b17d5a63ffba9a6dcc787796c819f..0000000000000000000000000000000000000000
--- a/tools/servicec/lib/src/resources/java/fletch/Segment.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE.md file.
-
-package fletch;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-
-class Segment {
- public Segment(byte[] memory) {
- buffer = ByteBuffer.wrap(memory);
- buffer.order(ByteOrder.LITTLE_ENDIAN);
- }
-
- public Segment(MessageReader reader, byte[] memory) {
- buffer = ByteBuffer.wrap(memory);
- buffer.order(ByteOrder.LITTLE_ENDIAN);
- this.reader = reader;
- }
-
- public ByteBuffer buffer() { return buffer; }
- public MessageReader reader() { return reader; }
-
- public boolean getBoolean(int offset) {
- return buffer.get(offset) != 0;
- }
-
- public short getUnsigned(int offset) {
- short result = (short)buffer.get(offset);
- return (short)Math.abs(result);
- }
-
- public int getUnsignedChar(int offset) {
- int result = (int)buffer.getChar(offset);
- return (int)Math.abs(result);
- }
-
- public long getUnsignedInt(int offset) {
- long result = (long)buffer.getInt(offset);
- return (long)Math.abs(result);
- }
-
- private ByteBuffer buffer;
- private MessageReader reader;
-}
« no previous file with comments | « tools/servicec/lib/src/resources/java/fletch/Reader.java ('k') | tools/spawn_vm_and_attach.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698