proguard.io.ZipOutput.createOutputStream()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(69)

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

ZipOutput.createOutputStream介绍

[英]Creates a new zip entry, returning an output stream to write its data. It is the caller's responsibility to close the output stream.
[中]创建一个新的zip条目,返回一个输出流以写入其数据。调用方负责关闭输出流。

代码示例

代码示例来源:origin: syedlopez/proguard

/**
 * Creates a new zip entry, returning an output stream to write its data.
 * It is the caller's responsibility to close the output stream.
 * @param name             the name of the zip entry.
 * @param compress         specifies whether the entry should be compressed.
 * @param modificationTime the modification date and time of the zip entry,
 *                         in DOS format.
 * @return                 an output stream for writing the data of the
 *                         zip entry.
 */
public OutputStream createOutputStream(String  name,
                    boolean compress,
                    int     modificationTime)
throws IOException
{
  return createOutputStream(name,
               compress,
               modificationTime,
               null,
               null);
}

代码示例来源:origin: syedlopez/proguard

/**
 * Creates a new zip entry, returning an output stream to write its data.
 * It is the caller's responsibility to close the output stream.
 * @param name             the name of the zip entry.
 * @param compress         specifies whether the entry should be compressed.
 * @param modificationTime the modification date and time of the zip entry,
 *                         in DOS format.
 * @return                 an output stream for writing the data of the
 *                         zip entry.
 */
public OutputStream createOutputStream(String  name,
                    boolean compress,
                    int     modificationTime)
throws IOException
{
  return createOutputStream(name,
               compress,
               modificationTime,
               null,
               null);
}

代码示例来源:origin: syedlopez/proguard

/**
 * Creates a new zip entry, returning an output stream to write its data.
 * It is the caller's responsibility to close the output stream.
 * @param name             the name of the zip entry.
 * @param compress         specifies whether the entry should be compressed.
 * @param modificationTime the modification date and time of the zip entry,
 *                         in DOS format.
 * @return                 an output stream for writing the data of the
 *                         zip entry.
 */
public OutputStream createOutputStream(String  name,
                    boolean compress,
                    int     modificationTime)
throws IOException
{
  return createOutputStream(name,
               compress,
               modificationTime,
               null,
               null);
}

代码示例来源:origin: syedlopez/proguard

new PrintWriter(output.createOutputStream("file1.txt", false, 0, new byte[] { 0x34, 0x12, 4, 0, 0x48, 0x65, 0x6c, 0x6c, 0x6f }, "Comment"));
printWriter1.println("This is file 1.");
printWriter1.println("Hello, world!");
  new PrintWriter(output.createOutputStream("file2.txt", true, 0, null, "Another comment"));
printWriter2.println("This is file 2.");
printWriter2.println("Hello, world!");
  new PrintWriter(output.createOutputStream("file3.txt", false, 0, null, "Last comment"));
printWriter3.println("This is file 3.");
printWriter3.println("Hello, world!");

代码示例来源:origin: syedlopez/proguard

new PrintWriter(output.createOutputStream("file1.txt", false, 0, new byte[] { 0x34, 0x12, 4, 0, 0x48, 0x65, 0x6c, 0x6c, 0x6f }, "Comment"));
printWriter1.println("This is file 1.");
printWriter1.println("Hello, world!");
  new PrintWriter(output.createOutputStream("file2.txt", true, 0, null, "Another comment"));
printWriter2.println("This is file 2.");
printWriter2.println("Hello, world!");
  new PrintWriter(output.createOutputStream("file3.txt", false, 0, null, "Last comment"));
printWriter3.println("This is file 3.");
printWriter3.println("Hello, world!");

代码示例来源:origin: syedlopez/proguard

new PrintWriter(output.createOutputStream("file1.txt", false, 0, new byte[] { 0x34, 0x12, 4, 0, 0x48, 0x65, 0x6c, 0x6c, 0x6f }, "Comment"));
printWriter1.println("This is file 1.");
printWriter1.println("Hello, world!");
  new PrintWriter(output.createOutputStream("file2.txt", true, 0, null, "Another comment"));
printWriter2.println("This is file 2.");
printWriter2.println("Hello, world!");
  new PrintWriter(output.createOutputStream("file3.txt", false, 0, null, "Last comment"));
printWriter3.println("This is file 3.");
printWriter3.println("Hello, world!");

代码示例来源:origin: johnjohndoe/ProGuard

public boolean createDirectory(DataEntry dataEntry) throws IOException
{
  finishIfNecessary(dataEntry);
  setUp(dataEntry);
  // Did we get a zip output?
  if (currentZipOutput == null)
  {
    return false;
  }
  // Get the directory entry name.
  String name = dataEntry.getName() + ClassConstants.PACKAGE_SEPARATOR;
  // Create a new directory entry.
  OutputStream outputStream =
    currentZipOutput.createOutputStream(name,
                      false,
                      modificationTime);
  outputStream.close();
  return true;
}

代码示例来源:origin: johnjohndoe/ProGuard

public boolean createDirectory(DataEntry dataEntry) throws IOException
{
  finishIfNecessary(dataEntry);
  setUp(dataEntry);
  // Did we get a zip output?
  if (currentZipOutput == null)
  {
    return false;
  }
  // Get the directory entry name.
  String name = dataEntry.getName() + ClassConstants.PACKAGE_SEPARATOR;
  // Create a new directory entry.
  OutputStream outputStream =
    currentZipOutput.createOutputStream(name,
                      false,
                      modificationTime);
  outputStream.close();
  return true;
}

代码示例来源:origin: johnjohndoe/ProGuard

public boolean createDirectory(DataEntry dataEntry) throws IOException
{
  finishIfNecessary(dataEntry);
  setUp(dataEntry);
  // Did we get a zip output?
  if (currentZipOutput == null)
  {
    return false;
  }
  // Get the directory entry name.
  String name = dataEntry.getName() + ClassConstants.PACKAGE_SEPARATOR;
  // Create a new directory entry.
  OutputStream outputStream =
    currentZipOutput.createOutputStream(name,
                      false,
                      modificationTime);
  outputStream.close();
  return true;
}

代码示例来源:origin: johnjohndoe/ProGuard

public OutputStream createOutputStream(DataEntry dataEntry) throws IOException
{
  finishIfNecessary(dataEntry);
  setUp(dataEntry);
  // Did we get a zip output?
  if (currentZipOutput == null)
  {
    return null;
  }
  // Create a new zip entry.
  return currentZipOutput.createOutputStream(dataEntry.getName(),
                        true,
                        modificationTime);
}

代码示例来源:origin: johnjohndoe/ProGuard

public OutputStream createOutputStream(DataEntry dataEntry) throws IOException
{
  finishIfNecessary(dataEntry);
  setUp(dataEntry);
  // Did we get a zip output?
  if (currentZipOutput == null)
  {
    return null;
  }
  // Create a new zip entry.
  return currentZipOutput.createOutputStream(dataEntry.getName(),
                        true,
                        modificationTime);
}

代码示例来源:origin: johnjohndoe/ProGuard

public OutputStream createOutputStream(DataEntry dataEntry) throws IOException
{
  finishIfNecessary(dataEntry);
  setUp(dataEntry);
  // Did we get a zip output?
  if (currentZipOutput == null)
  {
    return null;
  }
  // Create a new zip entry.
  return currentZipOutput.createOutputStream(dataEntry.getName(),
                        true,
                        modificationTime);
}

相关文章