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

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

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 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
Index: tools/servicec/lib/src/resources/java/dartino/Segment.java
diff --git a/tools/servicec/lib/src/resources/java/dartino/Segment.java b/tools/servicec/lib/src/resources/java/dartino/Segment.java
deleted file mode 100644
index 56a2f5daedfe521d4e84d782780f8c4e60eccede..0000000000000000000000000000000000000000
--- a/tools/servicec/lib/src/resources/java/dartino/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 dartino;
-
-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/dartino/Reader.java ('k') | tools/servicec/lib/src/struct_layout.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698