Skip to content

Commit 14a59f3

Browse files
committed
Remove unused function - 'GetBFileBase64Content(OracleDataReader reader, string columnName)'
1 parent 55beea5 commit 14a59f3

File tree

1 file changed

+0
-36
lines changed

1 file changed

+0
-36
lines changed

QueryDB/Resources/Utils.cs

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -90,42 +90,6 @@ internal static string GetBFileBase64Content(OracleDataReader reader, int column
9090
return content;
9191
}
9292

93-
/// <summary>
94-
/// Retrieves the content of a BFILE column from an Oracle data reader as a Base64-encoded string, using the column name.
95-
/// </summary>
96-
/// <param name="reader">The Oracle data reader containing the BFILE column.</param>
97-
/// <param name="columnName">The name of the BFILE column to read.</param>
98-
/// <returns>Returns the BFILE content as a Base64-encoded string, or an empty string if the BFILE is null or the column does not exist.</returns>
99-
internal static string GetBFileBase64Content(OracleDataReader reader, string columnName)
100-
{
101-
string content = string.Empty;
102-
try
103-
{
104-
int columnIndex = reader.GetOrdinal(columnName);
105-
var bFile = reader.GetOracleBFile(columnIndex);
106-
if (bFile != null && !reader.IsDBNull(columnIndex))
107-
{
108-
bFile.OpenFile();
109-
byte[] buffer = new byte[bFile.Length];
110-
int bytesReadTotal = 0;
111-
while (bytesReadTotal < buffer.Length)
112-
{
113-
int bytesRead = bFile.Read(buffer, bytesReadTotal, buffer.Length - bytesReadTotal);
114-
if (bytesRead == 0)
115-
break;
116-
bytesReadTotal += bytesRead;
117-
}
118-
content = Convert.ToBase64String(buffer);
119-
bFile.Close();
120-
}
121-
}
122-
catch (IndexOutOfRangeException)
123-
{
124-
return content;
125-
}
126-
return content;
127-
}
128-
12993
/// <summary>
13094
/// Retrieves the content of a BFILE column from an Oracle data reader as a byte array, using the column name.
13195
/// </summary>

0 commit comments

Comments
 (0)