public override void Write(ChannelBuffer buffer) { buffer.writeInt(Type.typeId()); buffer.writeInt(ResourceIds.Length); foreach (long entity in ResourceIds) { buffer.writeLong(entity); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public long write(String path, java.nio.channels.ReadableByteChannel data, ByteBuffer temporaryBuffer, boolean hasData, int requiredElementAlignment) throws java.io.IOException public override long Write(string path, ReadableByteChannel data, ByteBuffer temporaryBuffer, bool hasData, int requiredElementAlignment) { char[] chars = path.ToCharArray(); _targetBuffer.writeShort(chars.Length); Protocol.writeChars(_targetBuffer, chars); _targetBuffer.writeByte(hasData ? 1 : 0); // TODO Make use of temporaryBuffer? BlockLogBuffer buffer = new BlockLogBuffer(_targetBuffer, _bufferMonitor); long totalWritten = Short.BYTES + chars.Length * Character.BYTES + Byte.BYTES; if (hasData) { _targetBuffer.writeInt(requiredElementAlignment); totalWritten += Integer.BYTES; totalWritten += buffer.Write(data); buffer.Dispose(); } return(totalWritten); }
public override FlushableChannel PutInt(int value) { @delegate.writeInt(value); return(this); }