Search in sources :

Example 1 with BdioReader

use of com.blackducksoftware.integration.hub.bdio.BdioReader in project hub-docker-inspector by blackducksoftware.

the class RestClientInspector method getSimpleBdioDocument.

private SimpleBdioDocument getSimpleBdioDocument(final String bdioString) throws IOException {
    final InputStream bdioInputStream = new ByteArrayInputStream(bdioString.getBytes());
    SimpleBdioDocument simpleBdioDocument = null;
    try (BdioReader bdioReader = new BdioReader(new Gson(), bdioInputStream)) {
        simpleBdioDocument = bdioReader.readSimpleBdioDocument();
    }
    return simpleBdioDocument;
}
Also used : ByteArrayInputStream(java.io.ByteArrayInputStream) ByteArrayInputStream(java.io.ByteArrayInputStream) InputStream(java.io.InputStream) BdioReader(com.blackducksoftware.integration.hub.bdio.BdioReader) Gson(com.google.gson.Gson) SimpleBdioDocument(com.blackducksoftware.integration.hub.bdio.model.SimpleBdioDocument)

Aggregations

BdioReader (com.blackducksoftware.integration.hub.bdio.BdioReader)1 SimpleBdioDocument (com.blackducksoftware.integration.hub.bdio.model.SimpleBdioDocument)1 Gson (com.google.gson.Gson)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 InputStream (java.io.InputStream)1