private String getResourceContent(DSCParser parser) throws IOException, DSCException {
StringBuffer sb = new StringBuffer();
while (parser.hasNext()) {
DSCEvent event = parser.nextEvent();
if (event.isLine()) {
sb.append(event.asLine().getLine()).append('\n');
} else if (event.isDSCComment()) {
if (DSCConstants.END_RESOURCE.equals(event.asDSCComment().getName())) {
break;
}
}