/// <seealso cref= Dumper#writeArchiveMetadata(OutputStream) </seealso> //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: void readArchiveMetadata(java.io.InputStream stream) throws java.io.IOException internal virtual void ReadArchiveMetadata(Stream stream) { DataInputStream metadata = new DataInputStream(stream); // Unbuffered. Will not play naughty tricks with the file position. int version = metadata.readInt(); if (version == 1) { _progressPrinter.maxFiles = metadata.readLong(); _progressPrinter.maxBytes = metadata.readLong(); } else { throw new IOException("Cannot read archive meta-data. I don't recognise this archive version: " + version + "."); } }
} // end of marshal method new public void unmarshal(DataInputStream dis) { base.unmarshal(dis); try { _environmentalSimulationApplicationID.unmarshal(dis); _fieldNumber = dis.readUshort(); _pduNumber = dis.readUshort(); _pduTotal = dis.readUshort(); _coordinateSystem = dis.readUshort(); _numberOfGridAxes = dis.readByte(); _constantGrid = dis.readByte(); _environmentType.unmarshal(dis); _orientation.unmarshal(dis); _sampleTime = dis.readLong(); _totalValues = dis.readUint(); _vectorDimension = dis.readByte(); _padding1 = dis.readUshort(); _padding2 = dis.readByte(); for (int idx = 0; idx < _numberOfGridAxes; idx++) { GridAxisRecord anX = new GridAxisRecord(); anX.unmarshal(dis); _gridDataList.Add(anX); } ; } // end try catch (Exception e) { Trace.WriteLine(e); Trace.Flush(); } } // end of unmarshal method
public override void readPacketData(DataInputStream datainputstream) { protocolVersion = datainputstream.readInt(); username = datainputstream.readUTF(); password = datainputstream.readUTF(); mapSeed = datainputstream.readLong(); dimension = datainputstream.readByte(); }
public void func_22091_b() { try { var file = new File(field_22099_b, "session.lock"); var datainputstream = new DataInputStream(new FileInputStream(file)); try { if (datainputstream.readLong() != field_22100_d) { throw new MinecraftException("The save is being accessed from another location, aborting"); } } finally { datainputstream.close(); } } catch (IOException) { throw new MinecraftException("Failed to check session lock, aborting"); } }
public override void readPacketData(DataInputStream datainputstream) { time = datainputstream.readLong(); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public long readLong() throws java.io.IOException public override long ReadLong() { return(_data.readLong()); }