| Index: tools/servicec/lib/src/resources/java/fletch/BuilderSegment.java
|
| diff --git a/tools/servicec/lib/src/resources/java/fletch/BuilderSegment.java b/tools/servicec/lib/src/resources/java/fletch/BuilderSegment.java
|
| deleted file mode 100644
|
| index b9223a71a2e49c05bd73825ef6403173194d1814..0000000000000000000000000000000000000000
|
| --- a/tools/servicec/lib/src/resources/java/fletch/BuilderSegment.java
|
| +++ /dev/null
|
| @@ -1,38 +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;
|
| -
|
| -class BuilderSegment extends Segment {
|
| - public BuilderSegment(MessageBuilder builder, int id, int size) {
|
| - super(new byte[size]);
|
| - this.builder = builder;
|
| - this.id = id;
|
| - used = 0;
|
| - }
|
| -
|
| - public boolean hasSpaceForBytes(int bytes) {
|
| - return used + bytes < buffer().capacity();
|
| - }
|
| -
|
| - public int allocate(int bytes) {
|
| - if (!hasSpaceForBytes(bytes)) return -1;
|
| - int result = used;
|
| - used += bytes;
|
| - return result;
|
| - }
|
| -
|
| - public int id() { return id; }
|
| - public int used() { return used; }
|
| - public MessageBuilder builder() { return builder; }
|
| -
|
| - public boolean hasNext() { return next != null; }
|
| - public BuilderSegment next() { return next; }
|
| - public void setNext(BuilderSegment segment) { next = segment; }
|
| -
|
| - private MessageBuilder builder;
|
| - private int id;
|
| - private BuilderSegment next;
|
| - private int used;
|
| -}
|
|
|