public class AnnotatedBytes
extends java.lang.Object
| Constructor and Description |
|---|
AnnotatedBytes(int width) |
| Modifier and Type | Method and Description |
|---|---|
void |
annotate(int length,
java.lang.String msg,
java.lang.Object... formatArgs)
Add an annotation of the given length at the current location.
|
void |
annotateTo(int offset,
java.lang.String msg,
java.lang.Object... formatArgs) |
void |
clearLimit() |
void |
deindent() |
int |
getAnnotationWidth() |
int |
getCursor() |
void |
indent() |
void |
moveBy(int offset)
Moves the cursor forward or backward by some amount
|
void |
moveTo(int offset)
Moves the cursor to a new location
|
void |
setLimit(int start,
int end) |
void |
writeAnnotations(java.io.Writer out,
byte[] data,
int offset)
Writes the annotated content of this instance to the given writer.
|
public void moveTo(int offset)
offset - The offset to move topublic void moveBy(int offset)
offset - The amount to move the cursorpublic void annotateTo(int offset,
@Nonnull
java.lang.String msg,
java.lang.Object... formatArgs)
public void annotate(int length,
@Nonnull
java.lang.String msg,
java.lang.Object... formatArgs)
length - the length of data being annotatedmsg - the annotation messageformatArgs - format arguments to pass to String.formatpublic void indent()
public void deindent()
public int getCursor()
public int getAnnotationWidth()
public void writeAnnotations(java.io.Writer out,
byte[] data,
int offset)
throws java.io.IOException
out - non-null; where to write tojava.io.IOExceptionpublic void setLimit(int start,
int end)
public void clearLimit()