diff src/org/tmatesoft/hg/internal/Filter.java @ 355:f2c11fe7f3e9

Newline filter shall respect whole stream when deciding whether to process line terminators, hence added stream preview functionality
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 06 Dec 2011 12:57:21 +0100
parents a37ce7145c3f
children
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/internal/Filter.java	Thu Dec 01 05:21:40 2011 +0100
+++ b/src/org/tmatesoft/hg/internal/Filter.java	Tue Dec 06 12:57:21 2011 +0100
@@ -28,10 +28,18 @@
  */
 public interface Filter {
 
-	// returns a buffer ready to be read. may return original buffer.
-	// original buffer may not be fully consumed, #compact() might be operation to perform 
+	/**
+	 * Filters data and returns a new buffer with data or an original buffer.
+	 * Original buffer may not be fully consumed, #compact() might be operation to perform
+	 * @param src
+	 * @return a buffer ready to be read
+	 */
+	//  
 	ByteBuffer filter(ByteBuffer src);
 
+	/*
+	 * Factory doesn't look into data (i.e. could't do a preview), works solely with path
+	 */
 	interface Factory {
 		void initialize(HgRepository hgRepo);
 		// may return null if for a given path and/or options this filter doesn't make any sense