public class MetadataService extends Object implements IMetadataService
Note that this class implements a service. Hence, is not a part of the public API and is a subject to change.
Constructor and Description |
---|
MetadataService() |
Modifier and Type | Method and Description |
---|---|
Torrent |
fromByteArray(byte[] bs)
Builds a torrent object from its binary representation.
|
Torrent |
fromInputStream(InputStream in)
Builds a torrent object from its binary representation.
|
Torrent |
fromUrl(URL url)
Builds a torrent object from its binary representation located at
url . |
public Torrent fromUrl(URL url)
IMetadataService
url
.fromUrl
in interface IMetadataService
url
- Binary bencoded representation of a torrent objectpublic Torrent fromInputStream(InputStream in)
IMetadataService
fromInputStream
in interface IMetadataService
in
- Input stream, containing a bencoded representation.
Caller should close the stream after the method has returned.public Torrent fromByteArray(byte[] bs)
IMetadataService
fromByteArray
in interface IMetadataService
bs
- binary bencoded representation of a torrent objectCopyright © 2016–2021. All rights reserved.