java.io.ObjectOutputStream.writeByte()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(118)

本文整理了Java中java.io.ObjectOutputStream.writeByte()方法的一些代码示例,展示了ObjectOutputStream.writeByte()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectOutputStream.writeByte()方法的具体详情如下:
包路径:java.io.ObjectOutputStream
类名称:ObjectOutputStream
方法名:writeByte

ObjectOutputStream.writeByte介绍

[英]Writes a byte (8 bit) to the target stream.
[中]

代码示例

代码示例来源:origin: apache/flink

private void writeObject(java.io.ObjectOutputStream out) throws IOException {
  out.defaultWriteObject();
  if (codec != null) {
    out.writeByte(codec.getCodecByte());
  } else {
    out.writeByte(-1);
  }
  if (userDefinedSchema != null) {
    byte[] json = userDefinedSchema.toString().getBytes(ConfigConstants.DEFAULT_CHARSET);
    out.writeInt(json.length);
    out.write(json);
  } else {
    out.writeInt(0);
  }
}

代码示例来源:origin: robovm/robovm

private void writeObject(ObjectOutputStream out) throws IOException {
  out.defaultWriteObject();
  out.writeByte(MAJOR);
  out.writeByte(MINOR);
  if (parameters == null) {
    out.writeInt(-1);
  } else {
    out.writeInt(parameters.length);
    for (Object element : parameters) {
      out.writeObject((element == null) ? null : element.toString());
    }
  }
}

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeByte(key[i]);
    s.writeByte(value[i]);
  }
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeByte(key[i]);
    s.writeObject(value[i]);
  }
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeObject(key[i]);
    s.writeByte(value[i]);
  }
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  s.writeInt(array.length);
  for (int i = 0; i < size; i++)
    s.writeByte(array[i]);
}

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeByte(key[i]);
    s.writeObject(value[i]);
  }
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final byte key[] = this.key;
  final byte value[] = this.value;
  final MapIterator i = new MapIterator();
  s.defaultWriteObject();
  for (int j = size, e; j-- != 0;) {
    e = i.nextEntry();
    s.writeByte(key[e]);
    s.writeByte(value[e]);
  }
}

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  int n = count;
  EntryIterator i = new EntryIterator();
  Entry e;
  s.defaultWriteObject();
  while (n-- != 0) {
    e = i.nextEntry();
    s.writeByte(e.key);
    s.writeByte(e.value);
  }
}
/**

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeByte(key[i]);
    s.writeShort(value[i]);
  }
}
private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final byte key[] = this.key;
  final byte value[] = this.value;
  final MapIterator i = new MapIterator();
  s.defaultWriteObject();
  for (int j = size, e; j-- != 0;) {
    e = i.nextEntry();
    s.writeByte(key[e]);
    s.writeByte(value[e]);
  }
}

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final byte key[] = this.key;
  final int value[] = this.value;
  final MapIterator i = new MapIterator();
  s.defaultWriteObject();
  for (int j = size, e; j-- != 0;) {
    e = i.nextEntry();
    s.writeByte(key[e]);
    s.writeInt(value[e]);
  }
}

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final byte key[] = this.key;
  final V value[] = this.value;
  final MapIterator i = new MapIterator();
  s.defaultWriteObject();
  for (int j = size, e; j-- != 0;) {
    e = i.nextEntry();
    s.writeByte(key[e]);
    s.writeObject(value[e]);
  }
}
@SuppressWarnings("unchecked")

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final byte key[] = this.key;
  final V value[] = this.value;
  final MapIterator i = new MapIterator();
  s.defaultWriteObject();
  for (int j = size, e; j-- != 0;) {
    e = i.nextEntry();
    s.writeByte(key[e]);
    s.writeObject(value[e]);
  }
}
@SuppressWarnings("unchecked")

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final long key[] = this.key;
  final byte value[] = this.value;
  final MapIterator i = new MapIterator();
  s.defaultWriteObject();
  for (int j = size, e; j-- != 0;) {
    e = i.nextEntry();
    s.writeLong(key[e]);
    s.writeByte(value[e]);
  }
}

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final K key[] = this.key;
  final byte value[] = this.value;
  final MapIterator i = new MapIterator();
  s.defaultWriteObject();
  for (int j = size, e; j-- != 0;) {
    e = i.nextEntry();
    s.writeObject(key[e]);
    s.writeByte(value[e]);
  }
}
@SuppressWarnings("unchecked")

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  int n = count;
  EntryIterator i = new EntryIterator();
  Entry<V> e;
  s.defaultWriteObject();
  while (n-- != 0) {
    e = i.nextEntry();
    s.writeByte(e.key);
    s.writeObject(e.value);
  }
}
/**

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  int n = count;
  EntryIterator i = new EntryIterator();
  Entry e;
  s.defaultWriteObject();
  while (n-- != 0) {
    e = i.nextEntry();
    s.writeLong(e.key);
    s.writeByte(e.value);
  }
}
/**

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  int n = count;
  EntryIterator i = new EntryIterator();
  Entry e;
  s.defaultWriteObject();
  while (n-- != 0) {
    e = i.nextEntry();
    s.writeByte(e.key);
    s.writeLong(e.value);
  }
}
/**

代码示例来源:origin: it.unimi.dsi/fastutil

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final int key[] = this.key;
  final byte value[] = this.value;
  final MapIterator i = new MapIterator();
  s.defaultWriteObject();
  for (int j = size, e; j-- != 0;) {
    e = i.nextEntry();
    s.writeInt(key[e]);
    s.writeByte(value[e]);
  }
}

相关文章

ObjectOutputStream类方法