equal
deleted
inserted
replaced
47 |
47 |
48 import jdk.jfr.AnnotationElement; |
48 import jdk.jfr.AnnotationElement; |
49 import jdk.jfr.SettingDescriptor; |
49 import jdk.jfr.SettingDescriptor; |
50 import jdk.jfr.ValueDescriptor; |
50 import jdk.jfr.ValueDescriptor; |
51 import jdk.jfr.internal.MetadataDescriptor.Element; |
51 import jdk.jfr.internal.MetadataDescriptor.Element; |
52 import jdk.jfr.internal.consumer.Parser; |
|
53 import jdk.jfr.internal.consumer.RecordingInput; |
52 import jdk.jfr.internal.consumer.RecordingInput; |
54 import jdk.jfr.internal.consumer.RecordingInternals; |
53 import jdk.jfr.internal.consumer.StringParser; |
55 |
54 |
56 /** |
55 /** |
57 * Parses metadata. |
56 * Parses metadata. |
58 * |
57 * |
59 */ |
58 */ |
66 |
65 |
67 public MetadataReader(RecordingInput input) throws IOException { |
66 public MetadataReader(RecordingInput input) throws IOException { |
68 this.input = input; |
67 this.input = input; |
69 int size = input.readInt(); |
68 int size = input.readInt(); |
70 this.pool = new ArrayList<>(size); |
69 this.pool = new ArrayList<>(size); |
71 Parser p = RecordingInternals.instance().newStringParser(); |
70 StringParser p = new StringParser(null, false); |
72 for (int i = 0; i < size; i++) { |
71 for (int i = 0; i < size; i++) { |
73 this.pool.add((String) p.parse(input)); |
72 this.pool.add((String) p.parse(input)); |
74 } |
73 } |
75 descriptor = new MetadataDescriptor(); |
74 descriptor = new MetadataDescriptor(); |
76 Element root = createElement(); |
75 Element root = createElement(); |