Static function to deserialize a graphical model from an input stream.

@param stream the stream to read from, assuming protobuf encoding
@return a new graphical model
@throws IOException passed through from the stream
504603
public static GraphicalModel readFromStream(InputStream stream) throws IOException {
    return readFromProto(GraphicalModelProto.GraphicalModel.parseDelimitedFrom(stream));
  }
476682
public void parseStream (InputStream stream)
        throws IOException
    {
        try {
            // read the XML input stream and construct the scene object
            _chars = new StringBuilder();
            XMLUtil.parse(this, stream);

        } catch (ParserConfigurationException pce) {
            throw (IOException) new IOException().initCause(pce);

        } catch (SAXException saxe) {
            throw (IOException) new IOException().initCause(saxe);
        }
    }
519428
def data_from_stream(self, stream):
        
        parser = self._make_representation_parser(stream, self.resource_class,
                                                  self._mapping)
        return parser.run()
529928
public static Builder fromStream(final InputStream credentialsStream) throws IOException {
    final GoogleCredentials credentials = GoogleCredentials.fromStream(credentialsStream);
    return new Builder(credentials);
  }
203611
public static KAFDocument createFromStream(Reader stream) throws IOException, JDOMException {
	KAFDocument kaf = null;
	kaf = ReadWriteManager.load(stream);
	return kaf;
    }
805169
public static ModelLoader load(InputStream stream) throws IOException {
        JsonNode tree = MAPPER.readTree(stream);
        JsonNode version = tree.get("FormatVersion");
        if (version == null || !version.isObject()) {
            throw new IllegalStateException("No FormatVersion found");
        }

        JsonNode major = version.get("Major");
        if (major == null || !major.isNumber()) {
            throw new IllegalStateException("No Major version found");
        }

        int majorVersion = major.asInt();

        switch (majorVersion) {
        case 1:
            return new ModelLoader(loadV1Model(tree, version));

        default:
            throw new IllegalStateException(
                    "Unknown major version " + majorVersion + ". Perhaps "
                    + "you need a newer version of the resources runtime?");
        }
    }
648901
public static PropertiesSettings from(InputStream stream) throws IOException
    {
        Properties properties = new Properties();
        properties.load(stream);
        return from(properties);
    }
1256076
public static <T> T readValue(InputStream inputStream, Class<T> type) throws IOException, BadVersionException {
        return DataModelSerializer.deserializeObject(inputStream, type);
    }
1374631
public <T> T deserialize(final InputStream stream, final int bufferSize) {
    ByteBufferInput in = new ByteBufferInput(stream, bufferSize);
    Kryo kryo = borrow();
    try {
      @SuppressWarnings("unchecked")
      T obj = (T) kryo.readClassAndObject(in);
      return obj;
    } finally {
      release(kryo);
    }
  }
284807
@GwtIncompatible("ObjectInputStream")
  public static CompilerOptions deserialize(InputStream objectInputStream)
      throws IOException, ClassNotFoundException {
    return (CompilerOptions) new java.io.ObjectInputStream(objectInputStream).readObject();
  }
859593
public static int serialize(OutputStream stream, Object obj) {
        ObjectMapper mapper = createMapperWithJaxbAnnotationInspector();

        try (DataOutputStream data = new DataOutputStream(stream);
             OutputStreamWriter writer = new OutputStreamWriter(data, StandardCharsets.UTF_8)) {
            mapper.writerWithDefaultPrettyPrinter().writeValue(writer, obj);
            return data.size();
        } catch (IOException e) {
            throw new ReportGenerationException(e);
        }
    }
962106
public int readFrom(InputStream stream) throws IOException {
        int bytesRead = stream.read(buffer);
        if (bytesRead < 0) {
            bytesInBuffer = 0;
        } else {
            bytesInBuffer = bytesRead;
        }
        return bytesRead;
    }
878652
public static Map<String, Object> read(InputStream stream)
		throws IOException
	{
		ConfigJsonInput input = new ConfigJsonInput(new InputStreamReader(stream, StandardCharsets.UTF_8));
		return read(input);
	}
177048
public Object fromStream(final byte[] iStream) throws IOException {
		if (iStream == null || iStream.length == 0)
			// NULL VALUE
			return null;

		final ORecordInternal<?> obj = Orient.instance().getRecordFactoryManager().newInstance();

		final ORID rid = new ORecordId().fromStream(iStream);

		obj.setIdentity(rid.getClusterId(), rid.getClusterPosition());
		return obj;
	}
883613
public static ConcatVector readFromStream(InputStream stream) throws IOException {
    return readFromProto(ConcatVectorProto.ConcatVector.parseDelimitedFrom(stream));
  }
973862
def deserialize(stream_or_string, **options):
    '''
    
    '''

    try:
        if not isinstance(stream_or_string, (bytes, six.string_types)):
            return toml.load(stream_or_string, **options)

        if isinstance(stream_or_string, bytes):
            stream_or_string = stream_or_string.decode('utf-8')

        return toml.loads(stream_or_string)
    except Exception as error:
        raise DeserializationError(error)
1098503
@SuppressWarnings("unchecked")
  public static <S extends Serializable> S deserialize(InputStream inputStream) throws IOException {
    try {
      return (S) new ObjectInputStream(inputStream).readObject();
    } catch (ClassNotFoundException exception) {
      IOException ioe = new IOException("Failed to deserialize object");
      ioe.initCause(exception);
      throw ioe;
    } finally {
      inputStream.close();
    }
  }