public class SanitizingStringWriter extends Object implements StringWriter
| Constructor and Description |
|---|
SanitizingStringWriter() |
| Modifier and Type | Method and Description |
|---|---|
int |
expectedSize(String name) |
static SanitizingStringWriter |
getInstance() |
int |
write(String name,
byte[] bytes,
int index)
Writes out a metric name into byte[] at the specified index.
|
public static SanitizingStringWriter getInstance()
public int expectedSize(String name)
expectedSize in interface StringWriterpublic int write(String name, byte[] bytes, int index)
A metric name must match [a-zA-Z_:][a-zA-Z0-9_:]*.
It's caller's responsibility to ensure the byte[] has enough space. This method requires at most `name.length() + 1` bytes.
write in interface StringWritername - Copyright © 2020. All rights reserved.