From ff4a7a48ed25a891368d8082218fb5904a7df1a3 Mon Sep 17 00:00:00 2001
From: Mrbytes <eguervos@msn.com>
Date: Tue, 18 Dec 2012 13:26:30 -0500
Subject: [PATCH] GitBlitWebApp_es.properties: Up-to-date. Some minor changes in syntax for better compression.

---
 src/com/gitblit/utils/FileUtils.java |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/src/com/gitblit/utils/FileUtils.java b/src/com/gitblit/utils/FileUtils.java
index cba88d0..0b8aeb4 100644
--- a/src/com/gitblit/utils/FileUtils.java
+++ b/src/com/gitblit/utils/FileUtils.java
@@ -99,6 +99,25 @@
 		}
 		return defaultValue;
 	}
+	
+	/**
+	 * Returns the byte [] content of the specified file.
+	 * 
+	 * @param file
+	 * @return the byte content of the file
+	 */
+	public static byte [] readContent(File file) {
+		byte [] buffer = new byte[(int) file.length()];
+		try {
+			BufferedInputStream is = new BufferedInputStream(new FileInputStream(file));
+			is.read(buffer,  0,  buffer.length);
+			is.close();
+		} catch (Throwable t) {
+			System.err.println("Failed to read byte content of " + file.getAbsolutePath());
+			t.printStackTrace();
+		}
+		return buffer;
+	}
 
 	/**
 	 * Returns the string content of the specified file.

--
Gitblit v1.9.1