@Test void testGetDescriptor() throws Exception { String descriptor = ArchiveHandler.getDescriptor(ArchiveHandlerTest.class.getResourceAsStream(SAMPLE_MTAR), MAX_MTA_DESCRIPTOR_SIZE); assertTrue(descriptor.contains("com.sap.mta.sample")); }
public static String getDescriptor(InputStream archiveStream, long maxMtaDescriptorSize) throws SLException { try (InputStream descriptorStream = getInputStream(archiveStream, MTA_DEPLOYMENT_DESCRIPTOR_NAME, maxMtaDescriptorSize)) { return IOUtils.toString(descriptorStream, StandardCharsets.UTF_8); } catch (IOException e) { throw new SLException(e, Messages.ERROR_RETRIEVING_MTA_MODULE_CONTENT); } }
ArchiveHandler { public static String getDescriptor(InputStream archiveStream, long maxMtaDescriptorSize) throws SLException { try (InputStream descriptorStream = getInputStream(archiveStream, MTA_DEPLOYMENT_DESCRIPTOR_NAME, maxMtaDescriptorSize)) { return IOUtils.toString(descriptorStream, StandardCharsets.UTF_8); } catch (IOException e) { throw new SLException(e, Messages.ERROR_RETRIEVING_MTA_MODULE_CONTENT); } } }
ArchiveHandler { public static String getDescriptor(InputStream archiveStream, long maxMtaDescriptorSize) throws SLException { try (InputStream descriptorStream = getInputStream(archiveStream, MTA_DEPLOYMENT_DESCRIPTOR_NAME, maxMtaDescriptorSize)) { return IOUtils.toString(descriptorStream, StandardCharsets.UTF_8); } catch (IOException e) { throw new SLException(e, Messages.ERROR_RETRIEVING_MTA_MODULE_CONTENT); } }  }
ArchiveHandler { public static String getDescriptor(InputStream archiveStream, long maxMtaDescriptorSize) throws SLException { try (InputStream descriptorStream = getInputStream(archiveStream, MTA_DEPLOYMENT_DESCRIPTOR_NAME, maxMtaDescriptorSize)) { return IOUtils.toString(descriptorStream, StandardCharsets.UTF_8); } catch (IOException e) { throw new SLException(e, Messages.ERROR_RETRIEVING_MTA_MODULE_CONTENT); } }  static Manifest getManifest(InputStream archiveStream, long maxManifestSize); static String getDescriptor(InputStream archiveStream, long maxMtaDescriptorSize); static byte[] getFileContent(InputStream archiveStream, String fileName, long maxMtaFileSize); static InputStream getInputStream(InputStream is, String entryName, long maxEntrySize); }
ArchiveHandler { public static String getDescriptor(InputStream archiveStream, long maxMtaDescriptorSize) throws SLException { try (InputStream descriptorStream = getInputStream(archiveStream, MTA_DEPLOYMENT_DESCRIPTOR_NAME, maxMtaDescriptorSize)) { return IOUtils.toString(descriptorStream, StandardCharsets.UTF_8); } catch (IOException e) { throw new SLException(e, Messages.ERROR_RETRIEVING_MTA_MODULE_CONTENT); } }  static Manifest getManifest(InputStream archiveStream, long maxManifestSize); static String getDescriptor(InputStream archiveStream, long maxMtaDescriptorSize); static byte[] getFileContent(InputStream archiveStream, String fileName, long maxMtaFileSize); static InputStream getInputStream(InputStream is, String entryName, long maxEntrySize); static final String MTA_DEPLOYMENT_DESCRIPTOR_NAME; }