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

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

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

ObjectOutputStream.writeShort介绍

[英]Writes a short (16 bit) to the target stream.
[中]向目标流写入短(16位)。

代码示例

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

out.defaultWriteObject();
short alteredFieldsBitMask = getAlteredFieldsBitMask();
out.writeShort(alteredFieldsBitMask);
if (id != null) {
  out.writeObject(id);

代码示例来源:origin: org.apache.shiro/shiro-core

out.defaultWriteObject();
short alteredFieldsBitMask = getAlteredFieldsBitMask();
out.writeShort(alteredFieldsBitMask);
if (id != null) {
  out.writeObject(id);

代码示例来源: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.writeShort(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 {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++)
    s.writeShort(a[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.writeShort(a[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.writeShort(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.writeObject(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 {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeShort(key[i]);
    s.writeInt(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.writeLong(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 {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeShort(key[i]);
    s.writeFloat(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.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 {
  s.defaultWriteObject();
  for (int i = 0; i < size; i++) {
    s.writeShort(key[i]);
    s.writeDouble(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.writeShort(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 {
  final int key[] = this.key;
  final short 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.writeShort(value[e]);
  }
}

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

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final K key[] = this.key;
  final short 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.writeShort(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 short 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.writeShort(value[e]);
  }
}

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

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final K key[] = this.key;
  final short 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.writeShort(value[e]);
  }
}
@SuppressWarnings("unchecked")

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

private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
  final short key[] = this.key;
  final long value[] = this.value;
  final MapIterator i = new MapIterator();
  s.defaultWriteObject();
  for (int j = size, e; j-- != 0;) {
    e = i.nextEntry();
    s.writeShort(key[e]);
    s.writeLong(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.writeInt(e.key);
    s.writeShort(e.value);
  }
}
/**

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

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

相关文章

ObjectOutputStream类方法