Reads required JAR files from an input stream and adds them to the
library cache manager.

@param in
the data stream to read the JAR files from
@throws IOException
thrown if an error occurs while reading the stream
482662
private void readRequiredJarFiles(final DataInput in) throws IOException {

		// Do jar files follow;
		final int numJars = in.readInt();

		if (numJars > 0) {

			for (int i = 0; i < numJars; i++) {

				final Path p = new Path();
				p.read(in);
				this.userJars.add(p);

				// Read the size of the jar file
				final long sizeOfJar = in.readLong();

				// Add the jar to the library manager
				LibraryCacheManager.addLibrary(this.jobID, p, sizeOfJar, in);
			}

		}

		// Register this job with the library cache manager
		LibraryCacheManager.register(this.jobID, this.userJars.toArray(new Path[0]));
	}
1307463
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();

    try {
      serialization = serializationClass.newInstance();
    } catch (IllegalAccessException | InstantiationException e) {
      throw new RuntimeException(
          "Failed to deserialize " + HadoopSerializationCoder.class.getSimpleName());
    }
  }
1161754
public Buffer readFrom(InputStream in) throws IOException {
    readFrom(in, Long.MAX_VALUE, true);
    return this;
  }
1194136
public void load(Reader in) {
		try {
			doLoad(in);
		} catch (Exception e) {
			throw Exceptions.propagate(e);
		}
	}
664234
private void readObject(final ObjectInputStream inp) throws IOException, ClassNotFoundException {
        inp.defaultReadObject();
        table = new Entry[inp.readInt()];
        threshold = (int) (table.length * loadFactor);
        queue = new ReferenceQueue();
        Object key = inp.readObject();
        while (key != null) {
            final Object value = inp.readObject();
            put(key, value);
            key = inp.readObject();
        }
    }
1175489
public static void copyBytes(final InputStream in, final OutputStream out) throws IOException {
		copyBytes(in, out, BLOCKSIZE, true);
	}
420703
@Override
  public void readFrom(StreamInput in) throws IOException {
    super.readFrom(in);

    routing = in.readOptionalString();
    preference = in.readOptionalString();

    if (in.readBoolean()) {
      querySource = in.readBytesReference();
    } else {
      querySource = null;
    }

    if (in.readBoolean()) {
      types = in.readStringArray();
    }

    field = in.readString();
    nowInMillis = in.readVLong();

    if (in.readBoolean()) {
      ordering = Ordering.values()[in.readVInt()];
    }

    if (in.readBoolean()) {
      maxTermsPerShard = in.readVInt();
    }

    if (in.readBoolean()) {
      termsEncoding = TermsEncoding.values()[in.readVInt()];
    }

    if (in.readBoolean()) {
      expectedTerms = in.readVLong();
    }
  }
79798
public void read(ByteCodeParser in)
    throws IOException
  {
    int length = in.readInt();

    if (length != 2)
      throw new IOException("expected length of 2 at " + length);
    
    int code = in.readShort();
    _signature = in.getUTF8(code);
  }
627970
public void read(ByteCodeParser in)
    throws IOException
  {
    int length = in.readInt();
    
    int exnCount = in.readShort();

    for (int i = 0; i < exnCount; i++) {
      int index = in.readShort();

      if (index == 0)
        _exceptions.add(null);
      
      _exceptions.add(in.getConstantPool().getClass(index).getName());
    }
  }
944882
public void readExternal(ObjectInput in) throws IOException {
        type = in.readByte();
        object = readInternal(type, in);
    }
126323
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
        final boolean isTraceOn = TraceComponent.isAnyTracingEnabled();
        if (isTraceOn && tc.isEntryEnabled())
            Tr.entry(tc, "readObject");

        in.defaultReadObject();

        // Read in eye catcher.
        byte[] eyeCatcher = new byte[EYECATCHER.length];

        // Insure that all of the bytes have been read.
        int bytesRead = 0;
        for (int offset = 0; offset < EYECATCHER.length; offset += bytesRead) {
            bytesRead = in.read(eyeCatcher, offset, EYECATCHER.length - offset);
            if (bytesRead == -1) {
                throw new IOException("end of input stream while reading eye catcher");
            }
        }

        // Validate that the eyecatcher matches
        for (int i = 0; i < EYECATCHER.length; i++) {
            if (EYECATCHER[i] != eyeCatcher[i]) {
                String eyeCatcherString = new String(eyeCatcher);
                throw new IOException("Invalid eye catcher '" + eyeCatcherString + "' in TimerHandle input stream");
            }
        }

        // Read in the rest of the header.
        @SuppressWarnings("unused")
        short incoming_platform = in.readShort();
        short incoming_vid = in.readShort();

        if (isTraceOn && tc.isDebugEnabled())
            Tr.debug(tc, "version = " + incoming_vid);

        // Verify the version is supported by this version of code.
        if (incoming_vid != Constants.TIMER_TASK_V1 &&
            incoming_vid != Constants.TIMER_TASK_V2) {
            throw new InvalidObjectException("EJB TimerTaskHandler data stream is not of the correct version, this client should be updated.");
        }

        // Read in the instance data.

        byte[] j2eeNameBytes = (byte[]) in.readObject();
        j2eeName = EJSContainer.j2eeNameFactory.create(j2eeNameBytes);
        userInfoBytes = (byte[]) in.readObject();

        switch (incoming_vid) {

            case Constants.TIMER_TASK_V1:
                expiration = in.readLong();
                interval = in.readLong();
                break;

            case Constants.TIMER_TASK_V2:
                parsedSchedule = (ParsedScheduleExpression) in.readObject();
                methodId = in.readInt();
                automaticMethodName = (String) in.readObject();
                automaticClassName = (String) in.readObject();
                break;

            default:
                // cannot occur since unsupported version detected above
                break;
        }

        if (isTraceOn && tc.isEntryEnabled())
            Tr.exit(tc, "readObject: " + this);
    }
245393
private void readObject(java.io.ObjectInputStream in)
        throws IOException, ClassNotFoundException
    {
        in.defaultReadObject();
        _cache=new HashMap();
    }
558308
public static void copy(InputStream in, Writer writer) throws IOException {
    copy(getInputStreamReader(in), writer);
    writer.flush();
  }
463730
public Buffer readFrom(InputStream in, long byteCount) throws IOException {
    if (byteCount < 0) throw new IllegalArgumentException("byteCount < 0: " + byteCount);
    readFrom(in, byteCount, false);
    return this;
  }
36450
public void addJar(String jarName) {
        try {
            list.add(new JarPathEntry(new JarFile(jarName)));
        } catch (IOException ignore) { }
    }
222661
static void addEntry(ZipEntry zipEntry, InputStream in, ZipOutputStream out) throws IOException {
    out.putNextEntry(zipEntry);
    if (in != null) {
      IOUtils.copy(in, out);
    }
    out.closeEntry();
  }
222955
void readFrom(InputStream in) throws IOException {
		//TODO could optimize for aligned instances
		final int size = finish - start;
		final int length = (size + 7) >> 3;
		if (length == 0) return;
		int p = size & 7;
		final int q = finish - p;
		if (p != 0) performAdj(SET, q, (long) in.read(), p);
		p = q;
		while (p > start) {
			p -= 8;
			performAdj(SET, p, (long) in.read(), 8);
		}
	}