gpt4 book ai didi

org.apache.atlas.repository.impexp.ZipSource.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 13:08:05 26 4
gpt4 key购买 nike

本文整理了Java中org.apache.atlas.repository.impexp.ZipSource.<init>()方法的一些代码示例,展示了ZipSource.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipSource.<init>()方法的具体详情如下:
包路径:org.apache.atlas.repository.impexp.ZipSource
类名称:ZipSource
方法名:<init>

ZipSource.<init>介绍

暂无

代码示例

代码示例来源:origin: apache/incubator-atlas

@DataProvider(name = "zipFileStocks")
public static Object[][] getDataFromZipFile() throws IOException {
  FileInputStream fs = ZipFileResourceTestUtils.getFileInputStream("stocks.zip");
  return new Object[][] {{ new ZipSource(fs) }};
}

代码示例来源:origin: org.apache.atlas/atlas-repository

@DataProvider(name = "zipFileStocksFloat")
public static Object[][] getDataFromZipFileWithLongFloats() throws IOException {
  FileInputStream fs = ZipFileResourceTestUtils.getFileInputStream("stocks-float.zip");
  return new Object[][] {{ new ZipSource(fs) }};
}

代码示例来源:origin: apache/incubator-atlas

@Test
public void improperInit_ReturnsNullCreationOrder() throws IOException, AtlasBaseException {
  byte bytes[] = new byte[10];
  ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
  ZipSource zs = new ZipSource(bais);
  List<String> s = zs.getCreationOrder();
  Assert.assertNull(s);
}

代码示例来源:origin: apache/incubator-atlas

@DataProvider(name = "zipFileStocksFloat")
public static Object[][] getDataFromZipFileWithLongFloats() throws IOException {
  FileInputStream fs = ZipFileResourceTestUtils.getFileInputStream("stocks-float.zip");
  return new Object[][] {{ new ZipSource(fs) }};
}

代码示例来源:origin: org.apache.atlas/atlas-repository

@DataProvider(name = "zipFileStocks")
public static Object[][] getDataFromZipFile() throws IOException {
  FileInputStream fs = ZipFileResourceTestUtils.getFileInputStream("stocks.zip");
  return new Object[][] {{ new ZipSource(fs) }};
}

代码示例来源:origin: org.apache.atlas/atlas-repository

@Test
public void improperInit_ReturnsNullCreationOrder() throws IOException, AtlasBaseException {
  byte bytes[] = new byte[10];
  ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
  ZipSource zs = new ZipSource(bais);
  List<String> s = zs.getCreationOrder();
  Assert.assertNull(s);
}

代码示例来源:origin: org.apache.atlas/atlas-repository

public static Object[][] getZipSource(String fileName) throws IOException {
  FileInputStream fs = ZipFileResourceTestUtils.getFileInputStream(fileName);
  return new Object[][]{{new ZipSource(fs)}};
}

代码示例来源:origin: apache/atlas

public static ZipSource getZipSource(String fileName) throws IOException, AtlasBaseException {
  FileInputStream fs = ZipFileResourceTestUtils.getFileInputStream(fileName);
  return new ZipSource(fs);
}

代码示例来源:origin: org.apache.atlas/atlas-repository

public static ZipSource getZipSource(String fileName) throws IOException {
  FileInputStream fs = ZipFileResourceTestUtils.getFileInputStream(fileName);
  return new ZipSource(fs);
}

代码示例来源:origin: org.apache.atlas/atlas-repository

ZipSource source = new ZipSource(new ByteArrayInputStream(FileUtils.readFileToByteArray(file)), ImportTransforms.fromJson(transforms));
  result = run(source, request, userName, hostName, requestingIP);
} catch (AtlasBaseException excp) {

代码示例来源:origin: org.apache.atlas/atlas-repository

private ZipSource runExportWithParameters(AtlasExportRequest request) throws AtlasBaseException, IOException {
  final String requestingIP = "1.0.0.0";
  final String hostName = "localhost";
  final String userName = "admin";
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  ZipSink zipSink = new ZipSink(baos);
  AtlasExportResult result = exportService.run(zipSink, request, userName, hostName, requestingIP);
  zipSink.close();
  ByteArrayInputStream bis = new ByteArrayInputStream(baos.toByteArray());
  ZipSource zipSource = new ZipSource(bis);
  return zipSource;
}

代码示例来源:origin: apache/atlas

ZipSource zipSource = new ZipSource(inputStream);

代码示例来源:origin: org.apache.atlas/atlas-repository

@Test
public void requestingEntityNotFound_NoData() throws AtlasBaseException, IOException {
  String requestingIP = "1.0.0.0";
  String hostName = "root";
  ByteArrayOutputStream baos = new ByteArrayOutputStream();
  ZipSink zipSink = new ZipSink(baos);
  AtlasExportResult result = exportService.run(
      zipSink, getRequestForFullFetch(), "admin", hostName, requestingIP);
  Assert.assertNull(result.getData());
  ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
  ZipSource zipSource = new ZipSource(bais);
  assertNotNull(exportService);
  assertNotNull(zipSource.getCreationOrder());
  Assert.assertFalse(zipSource.hasNext());
}

代码示例来源:origin: apache/incubator-atlas

ZipSource source = new ZipSource(new ByteArrayInputStream(FileUtils.readFileToByteArray(file)), ImportTransforms.fromJson(transforms));

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com