use of com.navercorp.pinpoint.io.header.InvalidHeaderException in project pinpoint by naver.
the class HeaderTBaseSerializer method writeHeader.
private void writeHeader(TBase<?, ?> base, HeaderEntity headerEntity) {
try {
final Header header = locator.headerLookup(base);
if (header == null) {
throw new TException("header must not be null base:" + base);
}
HeaderWriter headerWriter = new ByteArrayHeaderWriter(header, headerEntity);
byte[] headerBytes = headerWriter.writeHeader();
baos.write(headerBytes);
} catch (Exception e) {
throw new InvalidHeaderException("can not write header.", e);
}
}
Aggregations