mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-28 08:50:02 +02:00
Move FileChannel inside the loop
This commit is contained in:
@@ -116,11 +116,12 @@ public class EssentialsConf extends YamlConfiguration
|
|||||||
final FileInputStream inputStream = new FileInputStream(configFile);
|
final FileInputStream inputStream = new FileInputStream(configFile);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final FileChannel channel = inputStream.getChannel();
|
|
||||||
final ByteBuffer buffer = ByteBuffer.allocate((int)configFile.length());
|
final ByteBuffer buffer = ByteBuffer.allocate((int)configFile.length());
|
||||||
int retry = 0;
|
int retry = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
final FileChannel channel = inputStream.getChannel();
|
||||||
|
channel.position(0);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
int BUFFERSIZE = 1024;
|
int BUFFERSIZE = 1024;
|
||||||
|
Reference in New Issue
Block a user