public final class Stream extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
from(int pos,
io.vertx.core.buffer.Buffer buffer)
Codec usage
|
static InputStream |
in(File file)
Stream read from file object
new FileInputStream(file)
|
static InputStream |
in(String filename)
Stream read from Thread Class Loader
Thread.currentThread().getContextClassLoader()
|
static InputStream |
in(String filename,
Class<?> clazz)
Stream read from clazz
clazz.getResourceAsStream(filename)
|
static InputStream |
read(String filename) |
static InputStream |
read(String filename,
Class<?> clazz)
Ensure read from path
1.
|
static <T> byte[] |
to(T message)
Codec usage
|
public static <T> byte[] to(T message)
T - Target java object that will be converted to.message - The java object that will be converted from.public static <T> T from(int pos,
io.vertx.core.buffer.Buffer buffer)
T - The converted java object type, Generic Typepos - The position of readingbuffer - The buffer to hold the data from reading.public static InputStream read(String filename)
filename - The filename to describe source pathpublic static InputStream read(String filename, Class<?> clazz)
filename - The filename to describe source pathclazz - The class loader related classpublic static InputStream in(File file)
file - The file object to describe source pathpublic static InputStream in(String filename, Class<?> clazz)
filename - The filename to describe source pathclazz - The class loader related classpublic static InputStream in(String filename)
filename - The filename to describe source pathCopyright © 2017. All rights reserved.