| OLD | NEW |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 package fletch; | 5 package dartino; |
| 6 | 6 |
| 7 class BuilderSegment extends Segment { | 7 class BuilderSegment extends Segment { |
| 8 public BuilderSegment(MessageBuilder builder, int id, int size) { | 8 public BuilderSegment(MessageBuilder builder, int id, int size) { |
| 9 super(new byte[size]); | 9 super(new byte[size]); |
| 10 this.builder = builder; | 10 this.builder = builder; |
| 11 this.id = id; | 11 this.id = id; |
| 12 used = 0; | 12 used = 0; |
| 13 } | 13 } |
| 14 | 14 |
| 15 public boolean hasSpaceForBytes(int bytes) { | 15 public boolean hasSpaceForBytes(int bytes) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 public boolean hasNext() { return next != null; } | 30 public boolean hasNext() { return next != null; } |
| 31 public BuilderSegment next() { return next; } | 31 public BuilderSegment next() { return next; } |
| 32 public void setNext(BuilderSegment segment) { next = segment; } | 32 public void setNext(BuilderSegment segment) { next = segment; } |
| 33 | 33 |
| 34 private MessageBuilder builder; | 34 private MessageBuilder builder; |
| 35 private int id; | 35 private int id; |
| 36 private BuilderSegment next; | 36 private BuilderSegment next; |
| 37 private int used; | 37 private int used; |
| 38 } | 38 } |
| OLD | NEW |