20 package net.sf.gridarta.utils.xml;
22 import java.io.ByteArrayInputStream;
23 import java.io.IOException;
24 import java.io.InputStream;
25 import java.nio.charset.StandardCharsets;
26 import org.jetbrains.annotations.NotNull;
27 import org.jetbrains.annotations.Nullable;
80 public int read() throws IOException {
82 final int ch =
inject.read();
104 }
else if (ch ==
'!') {
107 final String doctypeDeclaration =
"DOCTYPE " +
rootElement +
" SYSTEM \"" +
systemId +
"\"><" + (char) ch;
108 inject =
new ByteArrayInputStream(doctypeDeclaration.getBytes(StandardCharsets.US_ASCII));
123 }
else if (ch !=
'?') {