Reads the data from the id3v1 tag

@exception FileNotFoundException if an error occurs
@exception IOException if an error occurs
503381
private void readTag(RandomAccessInputStream raf) throws FileNotFoundException, IOException
	{
		raf.seek(raf.length() - TAG_SIZE);
		byte[] buf = new byte[TAG_SIZE];
		raf.read(buf, 0, TAG_SIZE);
		String tag = new String(buf, 0, TAG_SIZE, ENC_TYPE);
		int start = TAG_START.length();
		title = tag.substring(start, start += TITLE_SIZE);
		artist = tag.substring(start, start += ARTIST_SIZE);
		album = tag.substring(start, start += ALBUM_SIZE);
		year = tag.substring(start, start += YEAR_SIZE);
		comment = tag.substring(start, start += COMMENT_SIZE);
		track = (int) tag.charAt(TRACK_LOCATION);
		genre = (int) tag.charAt(GENRE_LOCATION);
	}
766596
public int readByte()
        throws IOException
    {
        if (_chunkLength > 0) {
            _chunkLength--;
            if (_chunkLength == 0 && _isLastChunk)
                _chunkLength = END_OF_DATA;

            return read();
        }
        else if (_chunkLength == END_OF_DATA) {
            _chunkLength = 0;
            return -1;
        }

        int tag = read();

        switch (tag) {
            case 'N':
                return -1;

            case 'B':
            case 'b':
                _isLastChunk = tag == 'B';
                _chunkLength = (read() << 8) + read();

                int value = parseByte();

                // special code so successive read byte won't
                // be read as a single object.
                if (_chunkLength == 0 && _isLastChunk)
                    _chunkLength = END_OF_DATA;

                return value;

            default:
                throw new IOException("expected 'B' at " + (char) tag);
        }
    }
694500
private void readObject(ObjectInputStream s)
        throws IOException, ClassNotFoundException
    {
        s.defaultReadObject();
        Throwable cause = super.getCause();
        if (!(cause instanceof IOException))
            throw new InvalidObjectException("Cause must be an IOException");
    }
485149
private void read() throws IOException {
        lastModified = jobFile.lastModified();
        if (jobFile.exists()) {
            try (final InputStream in = new FileInputStream(jobFile)) {
                final XMLReader parser = XMLUtils.getXMLReader();
                parser.setContentHandler(new JobHandler(prop, files));

                parser.parse(new InputSource(in));
            } catch (final SAXException e) {
                throw new IOException("Failed to read job file: " + e.getMessage());
            }
        } else {
            // defaults
            prop.put(PROPERTY_GENERATE_COPY_OUTER, Generate.NOT_GENERATEOUTTER.toString());
            prop.put(PROPERTY_ONLY_TOPIC_IN_MAP, Boolean.toString(false));
            prop.put(PROPERTY_OUTER_CONTROL, OutterControl.WARN.toString());
        }
    }
402883
private void readObject(java.io.ObjectInputStream in)
                    throws IOException,
                    ClassNotFoundException
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "readObject : " + this); // d468174

        ivAbstractJPAComponent = (AbstractJPAComponent) JPAAccessor.getJPAComponent();

        ivPuRefId = (JPAPuId) in.readObject();
        ivJ2eeName = (J2EEName) in.readObject(); // d510184
        ivRefName = (String) in.readObject(); // d510184
        ivProperties = (Map<?, ?>) in.readObject();
        ivUnsynchronized = in.readBoolean();

        //F743-16027 - using JPAAccessor to get JPAComponent, rather than using cached (possibly stale) static reference
        ivPuInfo = ivAbstractJPAComponent.findPersistenceUnitInfo(ivPuRefId); // F743-18776
        ivTxKeyPuId = ivPuInfo.getPuId(); // d689596

        // Obtain reference to the pool again.                             d510184
        ivEntityManagerPool = ivPuInfo.getEntityManagerPool(ivJ2eeName,
                                                            ivRefName,
                                                            ivProperties);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "readObject : " + this);
    }
251224
public FileDefinition read() {

		// Parse blocks
		try {
			fillIn();
			mergeContiguousRegions( this.definitionFile.getBlocks());

		} catch( IOException e ) {
			addModelError( ErrorCode.P_IO_ERROR, this.currentLineNumber, exception( e ));
		}

		// Determine file type
		boolean hasFacets = false, hasComponents = false, hasInstances = false, hasImports = false;
		int ignorableBlocksCount = 0;
		for( AbstractBlock block : this.definitionFile.getBlocks()) {

			if( block.getInstructionType() == AbstractBlock.COMPONENT )
				hasComponents = true;

			else if( block.getInstructionType() == AbstractBlock.FACET )
				hasFacets = true;

			else if( block.getInstructionType() == AbstractBlock.INSTANCEOF )
				hasInstances = true;

			else if( block.getInstructionType() == AbstractBlock.IMPORT )
				hasImports = true;

			else if( block instanceof AbstractIgnorableInstruction )
				ignorableBlocksCount ++;
		}

		if( hasInstances ) {
			if( ! hasFacets && ! hasComponents )
				this.definitionFile.setFileType( FileDefinition.INSTANCE );
			else
				addModelError( ErrorCode.P_INVALID_FILE_TYPE, 1 );

		} else if( hasFacets || hasComponents ) {
			this.definitionFile.setFileType( FileDefinition.GRAPH );

		} else if( hasImports ) {
			this.definitionFile.setFileType( FileDefinition.AGGREGATOR );

		} else if( ignorableBlocksCount == this.definitionFile.getBlocks().size()) {
			addModelError( ErrorCode.P_EMPTY_FILE, 1 );
			this.definitionFile.setFileType( FileDefinition.EMPTY );
		}

		return this.definitionFile;
	}
170128
public synchronized int read() throws IOException
	{
		if (bytesUntilNextMetadata > 0)
		{
			bytesUntilNextMetadata--;
			return super.read();
		}
		else 
		if (bytesUntilNextMetadata == 0)
		{
			readMetadata();
			bytesUntilNextMetadata = metaint - 1;
			// -1 because we read byte on next line
			return super.read();
		}
		else
		{
			return super.read();
		}
	}
1335242
public static String read(URL url) throws IOException, NotFoundException {
        BufferedImage image = ImageIO.read(url);
        return read(image);
    }
1252402
public int read() throws IOException {
        synchronized (lock) {
            ensureOpen();
            for (;;) {
                if (nextChar >= nChars) {
                    fill();
                    if (nextChar >= nChars)
                        return -1;
                }
                if (skipLF) {
                    skipLF = false;
                    if (cb[nextChar] == '\n') {
                        nextChar++;
                        continue;
                    }
                }
                return cb[nextChar++];
            }
        }
    }
607277
@Override
	public int read() throws IOException {
		byte[] buf = new byte[1];

		int res = this.read(buf, 0, 1);

		if (res != -1) {
			return 0xFF & buf[0];
		}

		return res;
	}
1132916
@Override
    public int read() throws IOException {
        abortIfNeeded();
        int b = in.read();
        if (b == 'x' && !hasRemovedNamespace) {
            lookAheadData[0] = (byte)b;
            in.mark(lookAheadData.length);
            int bytesRead = in.read(lookAheadData, 1, lookAheadData.length - 1);
            in.reset();

            String string = new String(lookAheadData, 0, bytesRead + 1, StringUtils.UTF8);

            int numberCharsMatched = matchXmlNamespaceAttribute(string);
            if (numberCharsMatched > 0) {
                for (int i = 0; i < numberCharsMatched - 1; i++) {
                    in.read();
                }
                b = in.read();
                hasRemovedNamespace = true;
            }
        }

        return b;
    }
822603
public void readData(DataInput din) throws IOException {

        // Get the size of any device-specific data.
        m_length = din.readUnsignedByte();
        if (m_length < 2 || m_length > 255) {
            return;
        }

        // Get the run status and device identifier.
        m_slaveId = din.readUnsignedByte();
        m_status = din.readUnsignedByte();

        /*
         * The device-specific data is two bytes shorter than the
         * length read previously.  That length includes the run status
         * and slave ID.
         */
        m_data = new byte[m_length - 2];
        if (m_length > 2) {
            din.readFully(m_data, 0, m_length - 2);
        }
    }
667872
protected void readFileId() throws IOException {
    byte[] b = new byte[HEADER.length];
    in.readFully(b);

    if (!Arrays.equals(b, HEADER)) {
      throw new IOException(
          "file_id_string does not match. got: " + new String(b, Charsets.ISO_8859_1));
    }
  }
603448
@Override
    public synchronized File read()
        throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException {

        if (walker == null) {
            this.walker = new SimpleDirectoryWalker(rootDirectory);
            this.walker.start();
            //skip ahead if items have already been processed.
            long itemsRead = getItemsRead();
            if (itemsRead > 0) {
                for (int i = 0; i < itemsRead; i++) {
                    this.walker.next();
                }
            }
        }

        return this.walker.next();
    }
270950
public Asn1Object read() throws IOException {
        int tag = in.read();

        if (tag == -1)
            throw new IOException("Invalid DER: stream too short, missing tag"); //$NON-NLS-1$

        int length = getLength();

        byte[] value = new byte[length];
        int n = in.read(value);
        if (n < length)
            throw new IOException("Invalid DER: stream too short, missing value"); //$NON-NLS-1$

        Asn1Object o = new Asn1Object(tag, length, value);

        return o;
    }
927181
@Override public void readFrom(DataInput in) throws IOException, ClassNotFoundException {
        // 1. read the leading byte first
        byte leading=in.readByte();

        // 2. the flags
        flags=in.readShort();

        // 3. dest_addr
        if(Util.isFlagSet(leading, DEST_SET))
            dest=Util.readAddress(in);

        // 4. src_addr
        if(Util.isFlagSet(leading, SRC_SET))
            sender=Util.readAddress(in);

        // 5. headers
        int len=in.readShort();
        this.headers=createHeaders(len);
        for(int i=0; i < len; i++) {
            short id=in.readShort();
            Header hdr=readHeader(in).setProtId(id);
            this.headers[i]=hdr;
        }

        // 6. buf
        if(Util.isFlagSet(leading, BUF_SET)) {
            len=in.readInt();
            buf=new byte[len];
            in.readFully(buf, 0, len);
            length=len;
        }
    }
744130
@Override
  public int read () throws IOException
  {
    _ensureOpen ();
    while (true)
    {
      if (m_nNextCharIndex >= m_nChars)
      {
        _fill ();
        if (m_nNextCharIndex >= m_nChars)
          return -1;
      }
      if (m_bSkipLF)
      {
        m_bSkipLF = false;
        if (m_aBuf[m_nNextCharIndex] == '\n')
        {
          m_nNextCharIndex++;
          continue;
        }
      }
      return m_aBuf[m_nNextCharIndex++];
    }
  }