X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fnet%2Fpterodactylus%2Ffcp%2FFcpUtils.java;h=095708366bec6b54823f8daa6ce0ec105355d771;hb=a655177a4605236e866ac7e0ce32f7cb5289cbc4;hp=02e8c20aac5055672979d25a129b1ed78afc0040;hpb=19b64d7251237d7fae94b152d8a83b346ff77c33;p=jFCPlib.git
diff --git a/src/net/pterodactylus/fcp/FcpUtils.java b/src/net/pterodactylus/fcp/FcpUtils.java
index 02e8c20..0957083 100644
--- a/src/net/pterodactylus/fcp/FcpUtils.java
+++ b/src/net/pterodactylus/fcp/FcpUtils.java
@@ -1,6 +1,5 @@
/*
- * jSite2 - FcpUtils.java -
- * Copyright © 2008 David Roden
+ * jFCPlib - FcpUtils.java - Copyright © 2008 David Roden
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,7 +34,7 @@ import java.util.concurrent.atomic.AtomicLong;
/**
* Helper class with utility methods for the FCP protocol.
- *
+ *
* @author David âBombeâ Roden <bombe@freenetproject.org>
*/
public class FcpUtils {
@@ -45,7 +44,7 @@ public class FcpUtils {
/**
* Returns a unique identifier.
- *
+ *
* @return A unique identifier
*/
public static String getUniqueIdentifier() {
@@ -54,7 +53,7 @@ public class FcpUtils {
/**
* Parses an integer field, separated by â;â and returns the parsed values.
- *
+ *
* @param field
* The field to parse
* @return An array with the parsed values
@@ -75,7 +74,7 @@ public class FcpUtils {
/**
* Encodes the given integer array into a string, separating the values by
* â;â.
- *
+ *
* @param values
* The values to encode
* @return The encoded values
@@ -94,7 +93,7 @@ public class FcpUtils {
/**
* Encodes the given string array into a string, separating the values by
* â;â.
- *
+ *
* @param values
* The values to encode
* @return The encoded values
@@ -113,7 +112,7 @@ public class FcpUtils {
/**
* Tries to parse the given string into an int, returning -1
if
* the string can not be parsed.
- *
+ *
* @param value
* The string to parse
* @return The parsed int, or -1
@@ -125,7 +124,7 @@ public class FcpUtils {
/**
* Tries to parse the given string into an int, returning
* defaultValue
if the string can not be parsed.
- *
+ *
* @param value
* The string to parse
* @param defaultValue
@@ -143,7 +142,7 @@ public class FcpUtils {
/**
* Tries to parse the given string into an long, returning -1
* if the string can not be parsed.
- *
+ *
* @param value
* The string to parse
* @return The parsed long, or -1
@@ -155,7 +154,7 @@ public class FcpUtils {
/**
* Tries to parse the given string into an long, returning
* defaultValue
if the string can not be parsed.
- *
+ *
* @param value
* The string to parse
* @param defaultValue
@@ -172,7 +171,7 @@ public class FcpUtils {
/**
* Closes the given socket.
- *
+ *
* @param socket
* The socket to close
*/
@@ -188,7 +187,7 @@ public class FcpUtils {
/**
* Closes the given Closeable.
- *
+ *
* @param closeable
* The Closeable to close
*/
@@ -206,7 +205,7 @@ public class FcpUtils {
* Copies as many bytes as possible (i.e. until {@link InputStream#read()}
* returns -1
) from the source input stream to the destination
* output stream.
- *
+ *
* @param source
* The input stream to read from
* @param destination
@@ -224,7 +223,7 @@ public class FcpUtils {
* much bytes as possible will be copied (i.e. until
* {@link InputStream#read()} returns -1
to signal the end of
* the stream).
- *
+ *
* @param source
* The input stream to read from
* @param destination
@@ -244,7 +243,7 @@ public class FcpUtils {
* much bytes as possible will be copied (i.e. until
* {@link InputStream#read()} returns -1
to signal the end of
* the stream).
- *
+ *
* @param source
* The input stream to read from
* @param destination
@@ -276,7 +275,7 @@ public class FcpUtils {
/**
* This input stream stores the content of another input stream either in a
* file or in memory, depending on the length of the input stream.
- *
+ *
* @author David âBombeâ Roden <bombe@freenetproject.org>
*/
public static class TempInputStream extends InputStream {
@@ -296,7 +295,7 @@ public class FcpUtils {
/**
* Creates a new temporary input stream that stores the given input
* stream in a temporary file.
- *
+ *
* @param originalInputStream
* The original input stream
* @throws IOException
@@ -310,7 +309,7 @@ public class FcpUtils {
* Creates a new temporary input stream that stores the given input
* stream in memory if it is shorter than {@link #MAX_LENGTH_MEMORY},
* otherwise it is stored in a file.
- *
+ *
* @param originalInputStream
* The original input stream
* @param length
@@ -326,7 +325,7 @@ public class FcpUtils {
* Creates a new temporary input stream that stores the given input
* stream in memory if it is shorter than maxMemoryLength
,
* otherwise it is stored in a file.
- *
+ *
* @param originalInputStream
* The original input stream
* @param length