Tabnine Logo
IO.stream
Code IndexAdd Tabnine to your IDE (free)

How to use
stream
method
in
aQute.lib.io.IO

Best Java code snippets using aQute.lib.io.IO.stream (Showing top 20 results out of 315)

origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public InputStream openInputStream() throws Exception {
  if (buffer != null) {
    return IO.stream(buffer());
  } else {
    return IO.stream(file);
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

@Override
public InputStream openInputStream() throws Exception {
  if (buffer != null) {
    return IO.stream(buffer());
  } else {
    return IO.stream(file);
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

private Object convert(Type type, File in, TaggedData tag) throws IOException, Exception {
  if (type == TaggedData.class)
    return tag;
  if (type == File.class)
    return in;
  try (InputStream fin = IO.stream(in)) {
    return convert(type, fin);
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

@Override
public void add(Archive archive, File in) throws Exception {
  try (InputStream fin = IO.stream(in)) {
    add(archive, fin);
  } catch (Exception e) {
    aborted = true;
    throw e;
  }
}
origin: biz.aQute.bnd/biz.aQute.repository

public static RevisionMetadata parseRevisionMetadata(File metadataFile) throws Exception {
  try (InputStream in = IO.stream(metadataFile)) {
    return parseRevisionMetadata(in);
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

public static ProgramMetadata parseProgramMetadata(File metafile) throws Exception {
  try (InputStream in = IO.stream(metafile)) {
    return parseProgramMetadata(in);
  } catch (Exception e) {
    System.out.println("File " + metafile + " failed");
    throw e;
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

private Object convert(Type type, File in, TaggedData tag) throws IOException, Exception {
  if (type == TaggedData.class)
    return tag;
  if (type == File.class)
    return in;
  try (InputStream fin = IO.stream(in)) {
    return convert(type, fin);
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

public static RevisionMetadata parseRevisionMetadata(File metadataFile) throws Exception {
  try (InputStream in = IO.stream(metadataFile)) {
    return parseRevisionMetadata(in);
  }
}
origin: biz.aQute.bnd/biz.aQute.repository

public static ProgramMetadata parseProgramMetadata(File metafile) throws Exception {
  try (InputStream in = IO.stream(metafile)) {
    return parseProgramMetadata(in);
  } catch (Exception e) {
    System.out.println("File " + metafile + " failed");
    throw e;
  }
}
origin: biz.aQute.bnd/biz.aQute.repository

@Override
public void add(Archive archive, File in) throws Exception {
  try (InputStream fin = IO.stream(in)) {
    add(archive, fin);
  } catch (Exception e) {
    aborted = true;
    throw e;
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public InputStream openInputStream() throws Exception {
  return IO.stream(buffer());
}
origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public InputStream openInputStream() throws Exception {
  return IO.stream(buffer());
}
origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public InputStream openInputStream() {
  return IO.stream(buffer());
}
origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public InputStream openInputStream() throws Exception {
  return IO.stream(buffer());
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public void setManifest(File file) throws IOException {
  check();
  try (InputStream fin = IO.stream(file)) {
    Manifest m = new Manifest(fin);
    setManifest(m);
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

public void setManifest(File file) throws IOException {
  check();
  try (InputStream fin = IO.stream(file)) {
    Manifest m = new Manifest(fin);
    setManifest(m);
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public void encode(Encoder app, Object object, Map<Object, Type> visited) throws IOException, Exception {
  File f = (File) object;
  if (!f.isFile())
    throw new RuntimeException("Encoding a file requires the file to exist and to be a normal file " + f);
  try (InputStream in = IO.stream(f)) {
    app.append('"');
    Base64.encode(in, app);
    app.append('"');
  }
}
origin: org.osgi/osgi.enroute.configurer.simple.provider

@Override
public void encode(Encoder app, Object object, Map<Object, Type> visited) throws IOException, Exception {
  File f = (File) object;
  if (!f.isFile())
    throw new RuntimeException("Encoding a file requires the file to exist and to be a normal file " + f);
  try (InputStream in = IO.stream(f)) {
    app.append('"');
    Base64.encode(in, app);
    app.append('"');
  }
}
origin: biz.aQute.bnd/biz.aQute.bnd

@Override
public void encode(Encoder app, Object object, Map<Object, Type> visited) throws IOException, Exception {
  File f = (File) object;
  if (!f.isFile())
    throw new RuntimeException("Encoding a file requires the file to exist and to be a normal file " + f);
  try (InputStream in = IO.stream(f)) {
    app.append('"');
    Base64.encode(in, app);
    app.append('"');
  }
}
origin: biz.aQute.bnd/biz.aQute.bndlib

private void install(File f, RepositoryPlugin repo, Attrs value) throws Exception {
  try (Processor p = new Processor()) {
    p.getProperties()
      .putAll(value);
    PutOptions options = new PutOptions();
    options.context = p;
    try (InputStream in = IO.stream(f)) {
      repo.put(in, options);
    } catch (Exception e) {
      exception(e, "Cannot install %s into %s because %s", f, repo.getName(), e);
    }
  }
}
aQute.lib.ioIOstream

Popular methods of IO

  • copy
  • collect
  • getFile
  • deleteWithException
    Deletes the specified path. Folders are recursively deleted. Throws exception if any of the files co
  • reader
  • store
  • writer
  • delete
    Deletes the specified path. Folders are recursively deleted. If file(s) cannot be deleted, no feedba
  • read
  • rename
    Renames from to to replacing the target file if necessary.
  • isSymbolicLink
  • traverse
  • isSymbolicLink,
  • traverse,
  • close,
  • createSymbolicLink,
  • createSymbolicLinkOrCopy,
  • createTempFile,
  • decode,
  • mkdirs,
  • normalizePath

Popular in Java

  • Running tasks concurrently on multiple threads
  • addToBackStack (FragmentTransaction)
  • getResourceAsStream (ClassLoader)
  • onRequestPermissionsResult (Fragment)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • JLabel (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now