⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bytesequence.java

📁 代码是一个分类器的实现,其中使用了部分weka的源代码。可以将项目导入eclipse运行
💻 JAVA
字号:
package de.fub.bytecode.util;import java.io.*;/** * Utility class that implements a sequence of bytes which can be read * via the `readByte()' method. This is used to implement a wrapper for the  * Java byte code stream to gain some more readability. * * @version $Id: ByteSequence.java,v 1.2 2001/05/09 09:26:57 dahm Exp $ * @author  <A HREF="http://www.berlin.de/~markus.dahm/">M. Dahm</A> */public final class ByteSequence extends DataInputStream {  private ByteArrayStream byte_stream;  public ByteSequence(byte[] bytes) {     super(new ByteArrayStream(bytes));    byte_stream = (ByteArrayStream)in;  }  public final int getIndex()   { return byte_stream.getPosition(); }      final  void      unreadByte() { byte_stream.unreadByte(); }  private static final class ByteArrayStream extends ByteArrayInputStream {    ByteArrayStream(byte[] bytes) { super(bytes); }    final int  getPosition() { return pos; } // is protected in ByteArrayInputStream    final void unreadByte()  { if(pos > 0) pos--; }  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -