Summer.Batch.Extra.Ebcdic.EbcdicReader.Read C# (CSharp) Метод

Read() приватный Метод

Technical read byte array, given length and field format
   
private Read ( int length, Summer.Batch.Extra.Copybook.FieldFormat fieldFormat ) : byte[]
length int
fieldFormat Summer.Batch.Extra.Copybook.FieldFormat
Результат byte[]
        private byte[] Read(int length, FieldFormat fieldFormat)
        {
            byte[] bytes = new byte[length];
            int readBytes = _stream.Read(bytes);
            if (readBytes == 0) // note : -1 in java
            {
                throw new EndOfFileException();
            }
            if (readBytes < length)
            {
                throw new FieldParsingException(fieldFormat, bytes);
            }
            return bytes;
        }