public class DataInputBuffer extends DataInputStream { private static class Buffer extends ByteArrayInputStream {
public Buffer() {
super(new byte[] {});
} public void reset(byte[] input, int start, int length) {
this.buf = input;
this.count = start+length;
this. = start;
this.pos = start;
} public int getPosition() { return pos; }
public int getLength() { return count; }
} private Buffer buffer;
/** Constructs a new empty buffer. */
public DataInputBuffer() {
this(new Buffer());
} private DataInputBuffer(Buffer buffer) {
super(buffer);
this.buffer = buffer;
} /** Resets the data that the buffer reads. */
public void reset(byte[] input, int length) {
buffer.reset(input, 0, length);
} /** Resets the data that the buffer reads. */
public void reset(byte[] input, int start, int length) {
buffer.reset(input, start, length);
} /** Returns the current position in the input. */
public int getPosition() { return buffer.getPosition(); } /** Returns the length of the input. */
public int getLength() { return buffer.getLength(); }}
public Buffer() {
super(new byte[] {});
} public void reset(byte[] input, int start, int length) {
this.buf = input;
this.count = start+length;
this. = start;
this.pos = start;
} public int getPosition() { return pos; }
public int getLength() { return count; }
} private Buffer buffer;
/** Constructs a new empty buffer. */
public DataInputBuffer() {
this(new Buffer());
} private DataInputBuffer(Buffer buffer) {
super(buffer);
this.buffer = buffer;
} /** Resets the data that the buffer reads. */
public void reset(byte[] input, int length) {
buffer.reset(input, 0, length);
} /** Resets the data that the buffer reads. */
public void reset(byte[] input, int start, int length) {
buffer.reset(input, start, length);
} /** Returns the current position in the input. */
public int getPosition() { return buffer.getPosition(); } /** Returns the length of the input. */
public int getLength() { return buffer.getLength(); }}
解决方案 »
- A连接 触发事件
- 未能加载文件或程序集“AspWebControl”或它的某一个依赖项
- 帮帮忙吧 !!!!急 急 急 急
- 新手问题。。。如何连接数据库ACCESS
- 怎样才能实现在textbox中输入完内容后按回车提交,这个提交事件放在哪,怎么触发?(急,在线)
- 发了好几个帖子了 广告循环器 大家不用么? 怎么加入flash文件啊?
- 添加引用与 using 命令的区别?
- 如何添加一个 MediaPlay播放音乐 使用户具有一定的控制功能。
- 如何让下拉式菜单显示系统时间,请大家帮忙啊!!!!!!
- !!!正在紧急求救中,思归等高手进行!!!(初步准备散200分)
- 什么时候象后面用onserverclick?<INPUT onserverclick="ShowValues type="submit" value="Submit" runat="server" >
- 用asp.net如何实时实应用?
{
/// <summary>Returns the current position in the input. </summary>
virtual public int Position
{
get
{
return buffer.getPosition();
}
}
/// <summary>Returns the length of the input. </summary>
virtual public int Length
{
get
{
return buffer.getLength();
}
}
private class Buffer:System.IO.MemoryStream
{
public Buffer():base(SupportClass.ToByteArray(new sbyte[]{}))
//public Buffer():base(new sbyte[]{})
{
}
public virtual void reset(sbyte[] input, int start, int length)
{
//UPGRADE_ISSUE: 未转换 字段“java.io.ByteArrayInputStream.buf”。 "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaioByteArrayInputStreambuf_f'"
this.buf = input;
this.Length = (System.Int64) (start + length);
//UPGRADE_ISSUE: 未转换 字段“java.io.ByteArrayInputStream.~”。 "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javaioByteArrayInputStream~_f'"
this. = start;
this.Position = (System.Int64) start;
}
public virtual int getPosition()
{
return (int) Position;
}
public virtual int getLength()
{
return (int) Length;
}
}
private Buffer buffer;
/// <summary>Constructs a new empty buffer. </summary>
public DataInputBuffer():this(new Buffer())
{
}
private DataInputBuffer(Buffer buffer):base(buffer)
{
this.buffer = buffer;
}
/// <summary>Resets the data that the buffer reads. </summary>
public virtual void reset(sbyte[] input, int length)
{
buffer.reset(input, 0, length);
}
/// <summary>Resets the data that the buffer reads. </summary>
public virtual void reset(sbyte[] input, int start, int length)
{
buffer.reset(input, start, length);
}
}