View Javadoc
1   /*
2    * Copyright (C) 2017, Google Inc. and others
3    *
4    * This program and the accompanying materials are made available under the
5    * terms of the Eclipse Distribution License v. 1.0 which is available at
6    * https://www.eclipse.org/org/documents/edl-v10.php.
7    *
8    * SPDX-License-Identifier: BSD-3-Clause
9    */
10  
11  package org.eclipse.jgit.internal.storage.reftable;
12  
13  import java.io.IOException;
14  
15  /**
16   * Thrown if {@link org.eclipse.jgit.internal.storage.reftable.ReftableWriter}
17   * cannot fit a reference.
18   */
19  public class BlockSizeTooSmallException extends IOException {
20  	private static final long serialVersionUID = 1L;
21  
22  	private final int minBlockSize;
23  
24  	BlockSizeTooSmallException(int b) {
25  		minBlockSize = b;
26  	}
27  
28  	/**
29  	 * Get minimum block size in bytes reftable requires to write a ref.
30  	 *
31  	 * @return minimum block size in bytes reftable requires to write a ref.
32  	 */
33  	public int getMinimumBlockSize() {
34  		return minBlockSize;
35  	}
36  }