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

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

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

origin: biz.aQute.bnd/bndlib

public static byte[] read(URL u) throws IOException {
  return read(u.openStream());
}
origin: biz.aQute.bnd/biz.aQute.bndlib

private ByteBuffer getBuffer() throws Exception {
  if (buffer != null) {
    return buffer;
  }
  if (size == -1) {
    return buffer = ByteBuffer.wrap(IO.read(zip.getInputStream(entry)));
  }
  ByteBuffer bb = IO.copy(zip.getInputStream(entry), ByteBuffer.allocate((int) size));
  bb.flip();
  return buffer = bb;
}
origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension

public static byte[] read(URL url) throws IOException {
  URLConnection conn = url.openConnection();
  conn.connect();
  int length = conn.getContentLength();
  if (length == -1) {
    return read(conn.getInputStream());
  }
  return copy(conn.getInputStream(), new byte[length]);
}
origin: biz.aQute.bnd/biz.aQute.bndlib

@Override
public ByteBuffer buffer() throws Exception {
  if (buffer != null) {
    return buffer.duplicate();
  }
  if (IO.isWindows() && (size > THRESHOLD)) {
    return null;
  }
  return (buffer = IO.read(file)).duplicate();
}
origin: biz.aQute.bnd/biz.aQute.bnd

private ByteBuffer getBuffer() throws Exception {
  if (buffer != null) {
    return buffer;
  }
  if (size == -1) {
    return buffer = ByteBuffer.wrap(IO.read(zip.getInputStream(entry)));
  }
  ByteBuffer bb = IO.copy(zip.getInputStream(entry), ByteBuffer.allocate((int) size));
  bb.flip();
  return buffer = bb;
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public static byte[] read(URL url) throws IOException {
  URLConnection conn = url.openConnection();
  conn.connect();
  int length = conn.getContentLength();
  if (length == -1) {
    return read(conn.getInputStream());
  }
  return copy(conn.getInputStream(), new byte[length]);
}
origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle

public static byte[] read(URL url) throws IOException {
  URLConnection conn = url.openConnection();
  conn.connect();
  int length = conn.getContentLength();
  if (length == -1) {
    return read(conn.getInputStream());
  }
  return copy(conn.getInputStream(), new byte[length]);
}
origin: biz.aQute.bnd/biz.aQute.bnd

@Override
public ByteBuffer buffer() throws Exception {
  if (buffer != null) {
    return buffer.duplicate();
  }
  if (IO.isWindows() && (size > THRESHOLD)) {
    return null;
  }
  return (buffer = IO.read(file)).duplicate();
}
origin: biz.aQute.bnd/biz.aQute.resolve

public static byte[] read(URL url) throws IOException {
  URLConnection conn = url.openConnection();
  conn.connect();
  int length = conn.getContentLength();
  if (length == -1) {
    return read(conn.getInputStream());
  }
  return copy(conn.getInputStream(), new byte[length]);
}
origin: org.osgi/osgi.enroute.configurer.simple.provider

public static byte[] read(URL url) throws IOException {
  URLConnection conn = url.openConnection();
  conn.connect();
  int length = conn.getContentLength();
  if (length == -1) {
    return read(conn.getInputStream());
  }
  return copy(conn.getInputStream(), new byte[length]);
}
origin: biz.aQute.bnd/biz.aQute.bnd

public static byte[] read(URL url) throws IOException {
  URLConnection conn = url.openConnection();
  conn.connect();
  int length = conn.getContentLength();
  if (length == -1) {
    return read(conn.getInputStream());
  }
  return copy(conn.getInputStream(), new byte[length]);
}
origin: biz.aQute.bnd/biz.aQute.repository

public static byte[] read(URL url) throws IOException {
  URLConnection conn = url.openConnection();
  conn.connect();
  int length = conn.getContentLength();
  if (length == -1) {
    return read(conn.getInputStream());
  }
  return copy(conn.getInputStream(), new byte[length]);
}
origin: biz.aQute.bnd/biz.aQute.bnd

private ByteBuffer getBuffer() throws Exception {
  if (buffer != null) {
    return buffer;
  }
  InputStream in = open();
  if (size == -1) {
    return buffer = ByteBuffer.wrap(IO.read(in));
  }
  ByteBuffer bb = IO.copy(in, ByteBuffer.allocate(size));
  bb.flip();
  return buffer = bb;
}
origin: biz.aQute.bnd/biz.aQute.bndlib

private ByteBuffer getBuffer() throws Exception {
  if (buffer != null) {
    return buffer;
  }
  InputStream in = open();
  if (size == -1) {
    return buffer = ByteBuffer.wrap(IO.read(in));
  }
  ByteBuffer bb = IO.copy(in, ByteBuffer.allocate(size));
  bb.flip();
  return buffer = bb;
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public void load(File file, Reporter reporter, String[] syntaxHeaders) throws Exception {
  String source = decode(IO.read(file));
  load(source, file, reporter, syntaxHeaders);
}
origin: biz.aQute.bnd/biz.aQute.resolve

public void load(InputStream in, File file, Reporter reporter, String[] syntaxHeaders) throws IOException {
  String source = decode(IO.read(in));
  load(source, file, reporter, syntaxHeaders);
}
origin: biz.aQute.bnd/biz.aQute.repository

public void load(InputStream in, File file, Reporter reporter, String[] syntaxHeaders) throws IOException {
  String source = decode(IO.read(in));
  load(source, file, reporter, syntaxHeaders);
}
origin: biz.aQute.bnd/biz.aQute.bndlib

public void load(InputStream in, File file, Reporter reporter, String[] syntaxHeaders) throws IOException {
  String source = decode(IO.read(in));
  load(source, file, reporter, syntaxHeaders);
}
origin: biz.aQute.bnd/biz.aQute.bnd

public void load(InputStream in, File file, Reporter reporter, String[] syntaxHeaders) throws IOException {
  String source = decode(IO.read(in));
  load(source, file, reporter, syntaxHeaders);
}
origin: biz.aQute.bnd/biz.aQute.bndlib

private Object convert(Type ref, InputStream in) throws IOException, Exception {
  if (ref instanceof Class) {
    Class<?> refc = (Class<?>) ref;
    if (refc == byte[].class) {
      return IO.read(in);
    } else if (InputStream.class.isAssignableFrom((refc))) {
      return in;
    } else if (String.class == refc) {
      return IO.collect(in);
    }
  }
  String s = IO.collect(in);
  return codec.dec()
    .from(s)
    .get(ref);
}
aQute.lib.ioIOread

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
  • rename
    Renames from to to replacing the target file if necessary.
  • isSymbolicLink
  • stream
  • traverse
  • stream,
  • traverse,
  • close,
  • createSymbolicLink,
  • createSymbolicLinkOrCopy,
  • createTempFile,
  • decode,
  • mkdirs,
  • normalizePath

Popular in Java

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setRequestProperty (URLConnection)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • JButton (javax.swing)
  • Join (org.hibernate.mapping)
  • Top Vim plugins
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