net.digger:xymodem

Java implementation of XModem and YModem protocols, for downloading files.

Лицензия

Лицензия

Категории

Категории

Сеть
Группа

Группа

net.digger
Идентификатор

Идентификатор

xymodem
Последняя версия

Последняя версия

1.1.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

net.digger:xymodem
Java implementation of XModem and YModem protocols, for downloading files.
Ссылка на сайт

Ссылка на сайт

https://github.com/diggernet/XYModem
Система контроля версий

Система контроля версий

https://github.com/diggernet/XYModem/tree/develop

Скачать xymodem

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/net.digger/xymodem/ -->
<dependency>
    <groupId>net.digger</groupId>
    <artifactId>xymodem</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/net.digger/xymodem/
implementation 'net.digger:xymodem:1.1.0'
// https://jarcasting.com/artifacts/net.digger/xymodem/
implementation ("net.digger:xymodem:1.1.0")
'net.digger:xymodem:jar:1.1.0'
<dependency org="net.digger" name="xymodem" rev="1.1.0">
  <artifact name="xymodem" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.digger', module='xymodem', version='1.1.0')
)
libraryDependencies += "net.digger" % "xymodem" % "1.1.0"
[net.digger/xymodem "1.1.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
net.digger : crc-util jar 1.0.0

Модули Проекта

Данный проект не имеет модулей.

XYModem

XYModem is a Java implementation of the XModem and YModem file download protocols. It supports:

  • XModem-Checksum
  • XModem-CRC
  • XModem-1K
  • YModem-Batch
  • YModem-G

It also implements just enough of ZModem for AutoDownload support, though that only works if the sending ZModem implemenation provides automatic fallback to XModem or YModem.

Maven configuration

	<dependency>
		<groupId>net.digger</groupId>
		<artifactId>xymodem</artifactId>
		<version>1.1.0</version>
	</dependency>

Usage

Create an implemenation of IOHandler, to provide I/O methods appropriate for your environment.

Create a new instance of XYModem, giving it an instance of your IOHandler implementation.

	XYModem xymodem = new XYModem(ioHandler);

After the sender has been instructed to begin an XModem or YModem download, pass control to XYModem.

	xymodem.download();

XYModem will handle the handshaking and download process, using IOHandler.read(timeout) to read bytes from the sender and IOHandler.write(ch) to write bytes to the sender.

Each time a file download is complete, it will call IOHandler.received(download) to pass details of the downloaded file. This may be called more than once for a batch download (YModem-Batch or YModem-G).

When the download session is complete, XYModem.download() will return.

During the download process, IOHandler.log(message) and IOHandler.progress(bytes, total) will be called with messages and download progress.

Before beginning a download, you can call xymodem.setOverrunOption() to set the desired behavior if a file received via the YModem protocol exceeds the size claimed by the sender.

AutoDownload

Before a download has been initiated, incoming bytes can be checked for a ZModem download signature.

	xymodem.autoDownloadDetect(ch);

This method will return true if a ZModem ZRQINIT header is detected, indicating the sender is ready to begin download. It can be used to automatically initiate a download:

	if (xymodem.autoDownloadDetect(ch)) {
		xymodem.download();
	}

Please note: If the sending ZModem implementation does not support automatic fallback to XModem or YModem, the handshaking will time out and download() will return, with the sender still waiting for a ZModem download to begin.

Dependencies

License

XYModem is provided under the terms of the GNU LGPLv3.

Версии библиотеки

Версия
1.1.0
1.0.0