类 ByteCodeHelper
- java.lang.Object
-
- org.hibernate.bytecode.spi.ByteCodeHelper
-
public class ByteCodeHelper extends Object
A helper for reading byte code from various input sources.- 作者:
- Steve Ebersole
-
-
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static byte[]readByteCode(File file)Read class definition from a file.static byte[]readByteCode(InputStream inputStream)Reads class byte array info from the given input stream.static byte[]readByteCode(ZipInputStream zip)Read class definition a zip (jar) file entry.
-
-
-
方法详细资料
-
readByteCode
public static byte[] readByteCode(InputStream inputStream) throws IOException
Reads class byte array info from the given input stream. The stream is closed within this method!- 参数:
inputStream- The stream containing the class binary; null will lead to anIOException- 返回:
- The read bytes
- 抛出:
IOException- Indicates a problem accessing the given stream.
-
readByteCode
public static byte[] readByteCode(File file) throws IOException
Read class definition from a file.- 参数:
file- The file to read.- 返回:
- The class bytes
- 抛出:
IOException- Indicates a problem accessing the given stream.
-
readByteCode
public static byte[] readByteCode(ZipInputStream zip) throws IOException
Read class definition a zip (jar) file entry.- 参数:
zip- The zip entry stream.- 返回:
- The class bytes
- 抛出:
IOException- Indicates a problem accessing the given stream.
-
-